Ask Your Question

Revision history [back]

Cannot build 2.4.9 on Windows7 MinGW32

I am trying to build OpenCV 2.4.9 on Windows7, with MinGW32.

I downloaded the unix version, configure cmake for MinGW Makefiles, and pecify the location of c and c++ compilers. cmake --version ==> 2.8.12.

I did not alter anything in cmake. My version of g++: mingw32-g++.exe --version ==> 4.8.1

Configure/generate runs fine, then when running make

I get :

CMakeFiles\opencv_core.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN2cv12MatAllocatorD0Ev[__ZN2cv12MatAllocatorD0Ev]+0xf): undefined reference to `operator delete(void*)' CMakeFiles\opencv_core.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN2cv9FormatterD0Ev[__ZN2cv9FormatterD0Ev]+0xf): undefined reference to `operator delete(void*)' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles\opencv_core.dir/objects.a(algorithm.cpp.obj): bad reloc address 0xf in section `.text$_ZN2cv9FormatterD0Ev[__ZN2cv9FormatterD0Ev]' collect2.exe: error: ld returned 1 exit status mingw32-make[2]: *** [bin/libopencv_core249.dll] Error 1 mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 mingw32-make: *** [all] Error 2

Am I missing something?