CMake compile OpenCV using MinGW error in Win7
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.
try to specify your compiler and make tool explicitly:
(ofc. with your own path)