cmake编译opencv3.2时关于cuda的问题

出现一大堆的错误

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory E:/opencv/sources/modules/cudev
linked by target "opencv_test_cudev" in directory E:/opencv/sources/modules/cudev/test
linked by target "opencv_core" in directory E:/opencv/sources/modules/core

 

Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory E:/opencv/sources/modules/cudev
linked by target "opencv_test_cudev" in directory E:/opencv/sources/modules/cudev/test

 

linked by target "opencv_core" in directory E:/opencv/sources/modules/core

然后把with_CUDA的状态为:不选择,再次configure没有问题。

 

 

上面的解决方法是在你不需要使用cuda的情况下,之前也没有用到cuda,索性就编译时就不加入cuda了。现在使用cuda了,再次编译,又出现了上面的问题。

如果需要使用cuda,出现这种错误,在网上搜索的结果是,cuda9对opencv3.2架构不再支持。

我重新下载了opencv3.4,使用cuda9.2(或者cuda9.0/9.1/9.2),编译,没有再出现错误。

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值