我想在Windows 7(64位)上用Cmake編譯OpenCV。它將與Eclipse和CDT一起使用,爲此,我在某處讀取了無論編譯器如何指定Unix Makefiles的情況。 現在,考慮到我也有cygwin(對於Android NDK的東西),我第一次嘗試使用它的編譯器,並且我成功地配置了CMake並生成makefiles,但是在OpenCV吐出一個錯誤時只有63%的編譯結果(關於ffmpeg和HMODULE)。所以我切換到MinGW(HelloWorld,這也是一個痛苦,我不得不指定MinGW g ++的完整路徑,無論PATH變量設置如何),但現在我甚至不能配置CMake。我得到以下錯誤:CMake與MinGW和Eclipse CDT
The C compiler identification is GNU
The CXX compiler identification is GNU
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name.
Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:59 (enable_language)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE)
CMakeLists.txt:2 (PROJECT)
CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (project)
Configuring incomplete, errors occurred!
如果任何人有任何想法可能是什麼問題(?用cygwin外殼衝突),我會很感激任何輸入。提前致謝!
謝謝,這樣做!我想我發現有關使用Eclipse CDT的Unix Makefiles的信息已經過時了,再加上我被可用的CDT選項所誤導,並沒有考慮其他選擇。編譯OpenCV,希望它現在可以在Eclipse中使用。乾杯! – vkotor 2011-03-04 14:43:23