Windows 7 (64 ビット) で Cmake を使用して OpenCV をコンパイルしようとしています。これは Eclipse と CDT で使用するためのもので、コンパイラに関係なく Unix の Makefile を指定する必要があるとどこかで読んだことがあります。今、私もcygwinを持っているので(Android NDKのもののために)、最初にそのコンパイラを使ってみました.CMakeをうまく設定してmakefileを生成しましたが、OpenCVがエラーを吐いたとき(ffmpegとについて)コンパイルの63%にしか達しませんでしたHモジュール)。それでMinGWに切り替えました(HelloWorldも面倒で、PATH変数の設定に関係なくMinGW g ++へのフルパスを指定する必要がありました)が、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 シェルとの競合?) を誰かが知っている場合は、入力していただければ幸いです。前もって感謝します!