首页 > 解决方案 > 使用 cmake 为 cuda 构建 opencv 时出现错误 MSB8066

问题描述

试图构建 opencv 以与 cuda 一起使用。该过程在这里描述:https ://www.youtube.com/watch?v= YsmhKar8oOc 简而言之:安装Visual Studio,CUDA 11.02,下载opencv和opencv contrib。使用 cmake 进行配置和生成,然后使用以下命令启动构建: "C:\Program Files\CMake\bin\cmake.exe" --build "C:\Libraries\build" --target INSTALL --config Release 一段时间后它因此错误而崩溃

...
test_oil_painting.cpp
opencv_test_xphoto.vcxproj -> C:\Libraries\build\bin\Release\opencv_test_xphoto.exe
opencv_version.cpp
opencv_version.vcxproj -> C:\Libraries\build\bin\Release\opencv_version.exe
opencv_version.cpp
opencv_version_win32.vcxproj -> C:\Libraries\build\bin\Release\opencv_version_win32.exe
opencv_visualisation.cpp
opencv_visualisation.vcxproj -> C:\Libraries\build\bin\Release\opencv_visualisation.exe
waldboost_detector.cpp
opencv_waldboost_detector.vcxproj -> C:\Libraries\build\bin\Release\opencv_waldboost_detector.exe
Generate files for Python bindings and documentation
The system cannot find the path specified.    

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5):
error MSB8066:
Custom build for
'C:\Libraries\build\CMakeFiles\38d41f3cf6988dab461371ec0a1897f7\pyopencv_generated_enums.h.rule;
C:\Libraries\build\CMakeFiles\b1ecc7062e14bdf9fc394a7073f9148c\gen_opencv_python_source.rule'
exited with code 3. [C:\Libraries\build\modules\python_bindings_generator\gen_opencv_python_source.vcxproj]

这个错误是什么意思?

标签: pythonopencvcmake

解决方案


推荐阅读