OpenCV 3.2.0 installation error with Cmake and CodeLite IDE
I am trying to build OpenCV binaries for MinGW with CodeLite IDE in Windows 10. I followed the following steps:
- Downloaded OpenCV 3.2.0 self-extracting archive from the official website. And extracted in
C:/opencv
- Downloaded and installed MinGW 6.3.0 (ensured by running command
gcc --version
- Have installed CodeLite IDE and MinGW was configured as compiler (ensured by running C++ test programs)
Downloaded and installed Cmake3.10.1. Launched Cmake-gui and tried to build the binaries into D:/opencv/build/MinGW. Clicked on configure. Specified
CodeLite - MinGW Makefile
as the generator of the project. After sometimes I get an error sayingError in configuration process, project files may be invalid
Again clicked on Configure this time no error message was there. Clicked Generate. A CodeLite Workspace was generated in target directory
D:\opencv\build\MinGW
Opened that Workspace with CodeLite IDE. Started to build the project. And at 62% it showed error messages and stopped building.
[ 60%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/blobdetector.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/dynamic.cpp.obj [ 61%] Built target opencv_annotation [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/fast_score.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/fast.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/evaluation.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/gftt.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/feature2d.cpp.obj [ 61%] Built target opencv_visualisation mingw32-make.exe[1]: * [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2 mingw32-make.exe[1]: Waiting for unfinished jobs.... CMakeFiles\Makefile2:5379: recipe for target 'modules/ts/CMakeFiles/opencv_ts.dir/all' failed [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/kaze.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/kaze/AKAZEFeatures.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/kaze/KAZEFeatures.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/kaze/fed.cpp.obj [ 61%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/kaze/nldiffusion_functions.cpp.obj [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/keypoint.cpp.obj [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/main.cpp.obj mingw32-make.exe[1]: [modules/objdetect/CMakeFiles/opencv_objdetect.dir/all] Error 2 CMakeFiles\Makefile2:4649: recipe for target 'modules/objdetect/CMakeFiles/opencv_objdetect.dir/all' failed [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/mser.cpp.obj [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/matchers.cpp.obj [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/orb.cpp.obj [ 62%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/opencl_kernels_features2d.cpp.obj [ 62%] Linking CXX shared library ....\bin\libopencv_features2d320.dll mingw32-make.exe: * [all] Error 2 [ 62%] Built target opencv_features2d Makefile:161: recipe for target 'all' failed ====1 errors, 11 warnings, total time: 00:04:05 seconds====
I also tried the solution proposed in ...
gcc --version
really returned 3.2.0, it's far too old, to be useful.Why do you choose opencv 3.2.0 and not opencv 3.4.0?
Because I did my codes in OpenCV 3.2.0
@nsssayom, again, can you try to find the real error message ? your make output does not show anything useful, it must be some lines above. also, maybe use
make -j1
, to build in a single thread, and get a less cluttered output.@berak, I am building again. And will give you the full output msg as soon as I get that.
@berak, I downloaded the source of OpenCV 3.4 from the gitHub link you provided. Then used Cmake-gui with CodeLite-MinGW makefile. Got the same Error in configuration process, project files may be invalid msg. Clicked configure again and then Generate. Opened the project with CodeLite. Start building and got this output.
@berak, can you please tell me how to disable the "precompiled headers" option in cmake-gui?
please disable precompiled headers in cmake, clean your build folder, and try again.
(type "precompiled headers" into the search box)
this should solve the windres elated error.
@berak, Now I am getting this error
hmm. i'm a little lost now. using mingw64 4.8.1 even, and it builds fine for me. what does:
yield ?
(there might be something broken with detecting c++11 support with mingw)