2015-06-16 58 views
2

我試圖按照此http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/
至安設OpenCV的C++與Windows 8的代碼塊,但我封鎖在步驟4,當我嘗試生成的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++編譯器和有問題的make工具:

的cmake -G 「MinGW的Makefile文件」 -DCMAKE_MAKE_PROGRAM =「d:/程序/ 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 ..

(ofc。你的路徑會有所不同,但我希望你有這個想法)

((如果你在各行之間閱讀 - opencv開發人員似乎完全憤怒,因爲必須維護mingw peularities,似乎支持這一點死亡))

+0

謝謝你,問題解決了,這是我沒有「mingw32-make.exe」所以你的迴應後,我安裝在我的座標,現在它的工作 – avatar12