Ubuntu15.04中安装完opencv2.4.9后,进入opencv目录/samples/c/ 运行./build_all.sh 出先下面错误:
/usr/bin/ld: cannot find -lcufft
/usr/bin/ld: cannot find -lnpps
/usr/bin/ld: cannot find -lnppi
/usr/bin/ld: cannot find -lnppc
/usr/bin/ld: cannot find -lcudart
去网上找了许多解决/usr/bin/ld: cannot find -lxxx问题的资料,但是都没有解决。
不过看到一些材料中说libcufft,libnpps,libnppi,libnppc,libcudart是cuda的库,,搜索/usr/local/cuda-7.0/lib64,果然发现了libcufft.so.7.0,libnpps.so.7.0,libnppi.so.7.0,libnppc.so.7.0,libcudarts.so.7.0,
既然报错说是/usr/bin/ld:

在Ubuntu15.04上安装OpenCV2.4.9后,运行样本时出现链接错误:找不到-lcufft、-lnpps、-lnppi、-lnppc和-lcudart。通过查找资料发现这些是CUDA的库文件,于是在/usr/local/cuda-7.0/lib64目录下找到相应的.so.7.0文件。为解决这个问题,将这些文件在/usr/local/lib下创建软链接,成功解决了链接错误,使得OpenCV样本能够正常运行。

306

被折叠的 条评论
为什么被折叠?



