I've been trying to install OpenCV extra modules to use the tracking algorithms. I have downloaded all the files and CMake by following this tutorial https://putuyuwono.wordpress.com/2015/04/23/building-and-installing-opencv-3-0-on-windows-7-64-bit/
But however, I get to configuring in CMake-gui and I get an error I don't quite understand.
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".
I don't quite understand what it means? Can anyone tell me how to fix this?
Cheers
I'm using OpenCV regularly with visual c++ 2015 and 2017. I build OpenCV from the source directly without following the link you posted. I suggest you clone OpenCV and OpenCV Extra Modules from git
You need the following tools: git, cmake (I'm using version 3.8.2), Visual C++ 2015 or Visual C++ 2017
cd projects
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
Open cmake to your projects/opencv
, set the build directory, for example build-vc140
, select Visual C++ 14 (for visual c++ 2015) or Visual C++ 15 (for visual c++ 2017) and run configure.
Set the path of opencv_controlib/modules
, Set also the path where install the library setting CMAKE_INSTALL_PREFIX
.
Generate, open the solution and build the install
target
To include the library in your projects just set OpenCV_DIR
to the installed path