CMake compile OpenCV using MinGW error in Win7

asked 2015-01-21 16:51:30 -0600

I tried to compile OpenCV using MinGW in Win7 but failed. here is the error message I got:

The CXX compiler identification is GNU 4.8.1
The C compiler identification is GNU 4.8.1
Check for working CXX compiler: D:/Program Files/MinGW/bin/g++.exe
Check for working CXX compiler: D:/Program Files/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - failed
Detecting CXX compile features
Detecting CXX compile features - done
Check for working C compiler: D:/Program Files/MinGW/bin/gcc.exe
Check for working C compiler: D:/Program Files/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - failed
Detecting C compile features
Detecting C compile features - done
CMake Error at CMakeLists.txt:70 (message):
CMake fails to deterimine the bitness of target platform.

    Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake    toolchain file correctly sets the compiler details.

Configuring incomplete, errors occurred!
See also "D:/Program Files/opencv/build/x86/MinGW/CMakeFiles/CMakeOutput.log".
See also "D:/Program Files/opencv/build/x86/MinGW/CMakeFiles/CMakeError.log".

I don't think there is anything wrong with my CMake or g++/gcc compiler. I just don't know why it shows Detecting CXX compiler ABI info - failed. Hope someone tell give me a hint, thanks very much.

edit retag flag offensive close merge delete

Comments

try to specify your compiler and make tool explicitly:

cmake -G "MinGW Makefiles" -D CMAKE_CXX_COMPILER="D:\Programme\MinGW\bin\mingw32-g++.exe" -D CMAKE_MAKE_PROGRAM="D:\Programme\MinGW\bin\mingw32-make.exe"

(ofc. with your own path)

berak gravatar imageberak ( 2015-01-22 01:50:11 -0600 )edit