0

I've been really bugged out by this error. I'm trying to compile the OpenCV repository using CMake. I installed CMake using the Windows installer, the lastest one. However, I still can't properly build OpenCV properly. I'm new to using OpenCV and building using CMake. Here's the error log:

This is the command I used:

cmake -DBUILD_SHARED_LIBS=OFF ..

This is what is displayed afterwards:

-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:68 (project):
No CMAKE_CXX_COMPILER could be found.



CMake Error at CMakeLists.txt:68 (project):
No CMAKE_C_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "C:/Users/Jessie James Suarez/Documents/GitHub/Vision/opencv/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Jessie James Suarez/Documents/GitHub/Vision/opencv/build/CMakeFiles/CMakeError.log".
Jessie
  • 31
  • 5
  • Try specifying the generator (the [`-G` option](https://cmake.org/cmake/help/v3.6/manual/ccmake.1.html)). – James Adkison Jul 05 '16 at 03:25
  • Which one should I set it to after? – Jessie Jul 05 '16 at 03:27
  • The one for the compiler you're using to perform the build. Only you can answer that question. – James Adkison Jul 05 '16 at 03:28
  • Have you run the script that comes with visual studio which sets all the console environment variables? – Richard Hodges Jul 05 '16 at 06:08
  • I tried it but it still isn't working. I also used the CMake GUI but it gives the same error. – Jessie Jul 05 '16 at 06:25
  • This means CMake did find a compiler but it wasn't able to compile a simple test program. Please take a look at `CMakeFiles\CMakeError.log` and add the error message there to your question. The last time I had this problem was when my Visual Studio 2012 Professional standard installation did not install any Windows SDK. E.g. do you have any `C:\Program Files (x86)\Microsoft SDKs\Windows\v[some version]\bin\RC.Exe` file? – Florian Jul 05 '16 at 07:56

0 Answers0