Ask Your Question

Revision history [back]

Build opencv2.4.9 in code::blocks 13.12 failed

Hello,

I tried to build opencv 2.4.9 in code::blocks 13.12 on windows 7(32bit). I instaled MinGW - CMake and after this, I tried to build in code::blocks (steps: http://jatb181.blogspot.sk/2014/06/install-opencv-248-with-codeblocks.html or http://zahidhasan.wordpress.com/2013/02/16/how-to-install-opencv-on-windows-7-64bit-using-mingw-64-and-codeblocks/). But I becomed error during build in 33%:

Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_stat.cpp.obj cd /d C:\opencv\build\min\modules\core && C:\MinGW\bin\g++.exe -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG -DNDEBUG @CMakeFiles/opencv_perf_core.dir/includes_CXX.rsp -include "C:/opencv/build/min/modules/core/perf_precomp.hpp" -Winvalid-pch -o CMakeFiles\opencv_perf_core.dir\perf\perf_stat.cpp.obj -c C:\opencv\sources\modules\core\perf\perf_stat.cpp Linking CXX executable ....\bin\opencv_perf_core.exe cd /d C:\opencv\build\min\modules\core && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\opencv_perf_core.dir\link.txt --verbose=1 "C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\opencv_perf_core.dir/objects.a C:\MinGW\bin\ar.exe cr CMakeFiles\opencv_perf_core.dir/objects.a @CMakeFiles\opencv_perf_core.dir\objects1.rsp C:\MinGW\bin\g++.exe -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -msse -msse2 -mfpmath=sse -ffunction-sections -O2 -DNDEBUG -DNDEBUG -Wl,--whole-archive CMakeFiles\opencv_perf_core.dir/objects.a -Wl,--no-whole-archive -o ....\bin\opencv_perf_core.exe -Wl,--out-implib,....\bin\libopencv_perf_core.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\opencv_perf_core.dir\linklibs.rsp ../../lib/libopencv_ts249.a(ts_perf.cpp.obj):ts_perf.cpp:(.text.unlikely._ZN2cvlsERSoRKNS_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(int)' 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$_ZN12_GLOBAL__N_115PerfEnvironment8TearDownEv' collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: [bin/opencv_perf_core.exe] Error 1
*
mingw32-make.exe[1]: * [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
mingw32-make.exe: *
[all] Error 2
modules\core\CMakeFiles\opencv_perf_core.dir\build.make:535: recipe for target 'bin/opencv_perf_core.exe' failed
mingw32-make.exe[2]: Leaving directory 'C:/opencv/build/min'
CMakeFiles\Makefile2:1171: recipe for target 'modules/core/CMakeFiles/opencv_perf_core.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'C:/opencv/build/min'
C:/opencv/build/min/Makefile:136: recipe for target 'all' failed

Thanks so much for any questions, sorry and hope its not too long text.

Marcel