遇到usr/bin/ld: cannot find -lcufft解决方法。

遇到usr/bin/ld: cannot find -lcufft解决方法。

原文:https://blog.csdn.net/wan_exe/article/details/70171052

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/WAN_EXE/article/details/70171052

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问题的资料,但是都没有解决。

扫描二维码关注公众号,回复: 3141648 查看本文章

不过看到一些材料中说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: cannot find -lcufft,那是不是因为/usr/local/lib下面没有libcufft.so.7.0,libnpps.so.7.0,libnppi.so.7.0,libnppc.so.7.0,libcudarts.so.7.0的软连接? 

于是分别对上面几个文件建立软连接 sudo ln -s /usr/local/cuda-7.0/lib64/libcufft.so.7.0 /usr/local/lib/libcufft.so  

再次进入opencv目录/samples/c/ 运行./build_all.sh 问题解决,不会再报错,然后运行./find_obj 会出现无比nice的测试结果。。

完毕。

猜你喜欢

转载自blog.csdn.net/nanxiaoting/article/details/82468272