Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dear all, I have a similar problem but, unfortunately, I do not have that option when installing minGW :(

I would like to use OpenCV 2.4.9 (or OpenCV 2.4.10) with minGW (I dl mingw-getversion0.6.2-beta-20131004-1), cmake-3.1.0-rc1-win32-x86 and Eclipse Luna (32 bit) on Windows 8.1.

I do NOT manage to build the binary files under OpenCV\build\x86\minGW.

These are my steps:

  • I download minGW from, there are only 3 installation steps, which are shown in the 3 pictures below the download button. When I install this minGW, it creates a dir minGW under C:. I add to the system PATH c:/mingw/bin.
  • Download cmake from and install it
  • Download OpenCV 2.4.9, unzip it into C:. Under C:\ I have a dir called "opencv" storing 2 subdir "build" and "sources"; both of them are full of dir and files.
  • I run CMake GUI tool from "C:\opencv\sources" to "C:\openCV\build\x86\minGW\lib" using MinGW Makefiles as the generator. Obs: Inside "C:\openCV\build\x86" there where 3 sub-dir vc10, vc11, vc12 which are pre-build for Microsoft Visual Studio. Since I plan to use Eclipse, I added the subdir minGW, which has been populated by the installer of minGW. The subdir lib is empty at the beginning.
  • I open the command line, I go to the dir "C:\opencv\build\x86\mingw" and I run "mingw32-make".

This is the error message: [ 31%] Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/per f_stat.cpp.obj Linking CXX executable ....\bin\opencv_perf_core.exe ../../lib/libopencv_ts249.a(ts_perf.cpp.obj):ts_perf.cpp:(.text.unlikely._ZN2cvl sERSoRKNS_3MatE+0x15): undefined reference to cv::Formatter::get(char const*)' ../../lib/libopencv_ts249.a(ts_perf.cpp.obj):ts_perf.cpp:(.text$_ZN12_GLOBAL__N_ 115PerfEnvironment8TearDownEv+0xb): undefined reference tocv::setNumThreads(in t)' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ../../lib/ libopencv_ts249.a(ts_perf.cpp.obj): bad reloc address 0xb in section `.text$_ZN1 2_GLOBAL__N_115PerfEnvironment8TearDownEv' collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_perf_core.dir\build.make:535: recipe for target ' bin/opencv_perf_core.exe' failed mingw32-make[2]: * [bin/opencv_perf_core.exe] Error 1 CMakeFiles\Makefile2:1168: recipe for target 'modules/core/CMakeFiles/opencv_per f_core.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 Makefile:136: recipe for target 'all' failed mingw32-make: ** [all] Error 2

I tried to use also minGW 64 bit (dl from and it did NOT work at all: it install itself in a different place, I do not know exactly how to use it. Is it really necessary? I think it is easy to work with 32-bit software ...

I was working with OpenCV 2.4.10 (the last release), I switched to Open CV 2.4.9 because of the 32 bit issues. I cannot find anywhere info about these 32-64 bit problem. Can I use minGW 32 bit with these last versions of OpenCV?

I would really appreciate your support. Thank you very much in advance, Idil