C++ 在Windows 10 Visual Studio 2015上安装OpenCV和其他模块

C++ 在Windows 10 Visual Studio 2015上安装OpenCV和其他模块,c++,opencv,cmake-gui,C++,Opencv,Cmake Gui,我一直在尝试安装OpenCV额外的模块来使用跟踪算法。通过遵循本教程,我下载了所有文件和CMake 但是,当我开始在CMake gui中进行配置时,我发现了一个我不太理解的错误 The CXX compiler identification is unknown The C compiler identification is unknown Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visu

我一直在尝试安装OpenCV额外的模块来使用跟踪算法。通过遵循本教程,我下载了所有文件和CMake

但是,当我开始在CMake gui中进行配置时,我发现了一个我不太理解的错误

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_8cf7a.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.8/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.0/build/CMakeFiles/CMakeTmp



      Run Build Command:"MSBuild.exe" "cmTC_8cf7a.vcxproj"
      "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"



      Generator: execution of make failed.  Make command was: "MSBuild.exe"
      "cmTC_8cf7a.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:127 (project)


    Configuring incomplete, errors occurred!
    See also "C:/opencv-3.0/build/CMakeFiles/CMakeOutput.log".
    See also "C:/opencv-3.0/build/CMakeFiles/CMakeError.log".
我不太明白这是什么意思? 谁能告诉我怎么解决这个问题吗


欢呼:

< P>我使用OpenCV定期使用Visual C++ 2015和2017。 我直接从源代码构建OpenCV,而不遵循您发布的链接。 我建议您从git克隆OpenCV和OpenCV额外模块

您需要以下工具:Git、CGASE我使用的是3.3.2、Visual C++ 2015或Visual C++ 2017 < /P>

cd projects
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
打开cFAKE到您的项目/OpenCV,设置构建目录,例如Bu建DVC140,选择Visual C++ 14为Visual C++ 2015或Visual C++ 15为Visual C++ 2017运行RealTebug。 设置opencv_controlib/modules的路径,同时设置安装库设置CMAKE_install_前缀的路径

生成、打开解决方案并生成安装目标


在项目中包含库只需将OpenCVIDIR设置为安装路径

,我经常使用VisualC++ 2015和2017来使用OpenCV。 我直接从源代码构建OpenCV,而不遵循您发布的链接。 我建议您从git克隆OpenCV和OpenCV额外模块

您需要以下工具:Git、CGASE我使用的是3.3.2、Visual C++ 2015或Visual C++ 2017 < /P>

cd projects
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
打开cFAKE到您的项目/OpenCV,设置构建目录,例如Bu建DVC140,选择Visual C++ 14为Visual C++ 2015或Visual C++ 15为Visual C++ 2017运行RealTebug。 设置opencv_controlib/modules的路径,同时设置安装库设置CMAKE_install_前缀的路径

生成、打开解决方案并生成安装目标

要在项目中包含库,只需将OpenCV_DIR设置为安装路径