We are currently trying to build an environment for GPU programming using OpenCV.
However, there are some problems and the installation (strictly lib, dll creation) will fail. If you know the cause, please let me know.
When you open OpenCV.sln
in Visual Studio and build the INSTALL
project, the following message appears.
...
2>CMake Error at cuda_compile_generated_gpu_mat.cu.obj.cmake: 206 (message):
2>Error generating
2>F: /opencv-3.4.0/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj
2>
2>
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.target(171,5): error MSB6006: "cmd.exe" ended with code 1.
2>Project "opencv_core.vcxproj" build terminated -- Failed.
...
10>CMake Error at cuda_compile_generated_column_filter.16sc1.cu.obj.cmake: 206 (message):
15>CMake does not need to re-run cause F: /opencv-3.4.0/build/modules/phase_unwrapping/CMakeFiles/generate.stamp is up-to-date.
10>Error generating
10>F: /opencv-3.4.0/build/modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_column_filter.16sc1.cu.obj
10>
10>
10>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.target(171,5): error MSB6006: "cmd.exe" ended with code 1.
16>Building Custom Rule F: /opencv-3.4.0/opencv_contrib-3.4.0/modules/fuzy/CMakeLists.txt
10>Project "opencv_cudafilters.vcxproj" build terminated -- Failed.
...
I have encountered the same phenomenon using an old CMake (v3.9).Using the latest CMake v3.10.2 at the time of answering questions has improved the problem.
CUDA 9.1 cannot be compiled with the latest VisualStudio 2017.It's up to 15.4, so let's check the VisualStudio 2017 version.
The 15.45 installer may no longer be available for download.
VisualStudio 2015 is compatible, so if you can't find the installer for 14.45, please give up and use VisualStudio 2015.
The reason for the compilation error is that the comments in the header file contain characters that cannot be displayed in CP932, so you can delete the comments, save them again in Unicode, or compile them in English.
© 2024 OneMinuteCode. All rights reserved.