2015-06-16 2 views
2

Я пытаюсь вселить OpenCV C++ с CodeBlocks в Windows 8, следуя этой http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/
, но я оказался в шаге 4.When я пытаюсь генерировать Cmake у меня есть эта ошибка:Ошибка: Cmake не может генерировать OpenCV

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

просто сделать очевидную вещь, и указать C, C++ компилятор и инструмент сделать в вопрос:

CMake -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM = "D:/Program/MinGW/бен/mingw32 -make.exe "-DCMAKE_CXX_COMPILER =" D:/Program/MinGW/bin/mingw32-g ++. exe "-DCMAKE_C_COMPILER =" D:/Program/MinGW/bin/m ingw32-gcc.exe "-DWITH_IPP = OFF ..

(из. ваш путь будет меняться, но я надеюсь, вы получите эту идею)

((если вы читаете между строками - разработчики opencv, похоже, полностью разозлились, вынуждены поддерживать средние особенности, поддержка которых, похоже, кончина))

+0

спасибо, проблема решена, это было то, что у меня не было «mingw32-make.exe», поэтому после вашего ответа я устанавливаю его в своем ординатуре, и теперь он работает – avatar12

Смежные вопросы