我一直在尝试在opencv_contrib中安装其他模块,但在尝试在CMake中配置时,我一直遇到错误。
这是我到目前为止采取的步骤:
C:/ Program Files(x86)/ Microsoft Visual Studio 14.0 / VC / bin / cl.exe
当我确认这个并且配置进度时,我提供了这个错误:
The CXX compiler identification is unknown
The C compiler identification is unknown
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
CMake Error: Generator: execution of make failed. Make command was: "MSBuild.exe" "cmTC_7c114.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeTmp
Run Build Command:"MSBuild.exe" "cmTC_7c114.vcxproj"
"/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Generator: execution of make failed. Make command was: "MSBuild.exe"
"cmTC_7c114.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:98 (project)
Configuring incomplete, errors occurred!
See also "C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeOutput.log".
See also "C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeError.log".
请有人解释如何解决这个问题,还是有其他方法可以包含我需要的模块?
我环顾四周,建议将cl.exe作为管理员运行,但这并没有解决问题。
答案 0 :(得分:2)
我设法让它工作,我想我会在这里更新以防其他人遇到类似的问题。
我不应该选择Visual Studio 15作为项目的生成器,而应该选择的实际生成器是Visual Studio 14 Win64。