错误:Cmake无法生成openCV

时间:2015-06-16 16:58:30

标签: opencv cmake codeblocks

我正在尝试按照http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/的方式在Windows 8中使用codeBlocks安装opencv C ++  但我在步骤4中被阻止。当我尝试生成Cmake时,我有这个错误:

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: C:/MinGW/CMakeFiles/3.3.0-rc1/CMakeCXXCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: C:/MinGW/CMakeFiles/3.3.0-rc1/CMakeCCompiler.cmake
CMake Error at CMakeLists.txt:63 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler
  name if it is in the PATH.


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

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name
  if it is in the PATH.


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

1 个答案:

答案 0 :(得分:1)

做一件显而易见的事情,并指定你的c,c ++编译器和有问题的make工具:

cmake -G" MinGW Makefiles" -DCMAKE_MAKE_PROGRAM =" d:/Programme/MinGW/bin/mingw32-make.exe" -DCMAKE_CXX_COMPILER =" d:/编程/ MinGW的/ bin中/的mingw32-G ++ EXE" -DCMAKE_C_COMPILER =" d:/Programme/MinGW/bin/mingw32-gcc.exe" -DWITH_IPP = OFF ..

(通常。你的路径会有所不同,但我希望,你明白了)

((如果你在两行之间阅读 - opencv开发者似乎完全因为不得不维持mingw pecularities而感到生气,对此的支持似乎已经消亡))