我无法使用cmake构建支持CUDA(版本5)的OpenCV 2.4.3库。 问题似乎来自nvcc,根据另一个帖子:Why won't OpenCV compile in NVCC?。但这并没有解释如何安装OpenCV。
任何可以帮助我的答案都将非常感激!
Computer: Dell46 precision M4700 machine with Windows 7 professional, 64bit os
Compiler: Microsoft Visual Studio 2008,
CMake version: 2.8.10.2
CUDA: 5.0
Error 3 fatal error : Option '--cubin (-cubin)' is not allowed when compiling for multiple GPU code instances nvcc
Error 4 fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_core243.lib' opencv_test_ml
Error 5 fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_core243.lib' opencv_perf_video
Error 6 fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_core243.lib' opencv_test_features2d
Error 7 fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_core243.lib' opencv_perf_nonfree
Error 8 fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_core243.lib' opencv_perf_photo
etc.
答案 0 :(得分:2)
:)很高兴终于找到了解决方案! 如上面显示的第一个错误所示,不允许使用-cubin,因此解决方法是删除此选项。逐步解决方案是:
<CMakeCache.txt>:
//Generate and parse .cubin files in Device mode.
CUDA_BUILD_CUBIN:BOOL=OFF
祝你好运!