CMake с MinGW и Eclipse CDT

Я пытаюсь скомпилировать OpenCV с помощью Cmake в Windows 7 (64-разрядная версия). Он должен использоваться с Eclipse и CDT, для которых я где-то читал, что вы должны указывать файлы Makefile Unix независимо от компилятора. Теперь, учитывая, что у меня также есть cygwin (для материала Android NDK), я сначала попытался использовать его компиляторы, и я успешно настроил CMake и сгенерировал make-файлы, но дошел только до 63% компиляции, когда OpenCV выдает ошибку (о ffmpeg и HMODULE). Поэтому я переключился на MinGW (HelloWorld с этим тоже было больно, мне пришлось указать полный путь к MinGW g ++ независимо от настройки переменной PATH), но теперь я даже не могу настроить CMake. Я получаю следующую ошибку:

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?), Я буду признателен за любой ввод. Заранее спасибо!

5
задан vkotor 3 March 2011 в 09:24
поделиться