Ask Your Question
0

opencv build with qt

asked 2015-09-07 07:33:27 -0600

peter_cz gravatar image

updated 2015-09-07 08:12:54 -0600

Dears,

I'm trying to build OpenCV WITH_QT, at WIndows 7 64bit using MinGW. Linking ends with error:

Scanning dependencies of target opencv_highgui
[ 40%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window.cpp.obj
[ 40%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.obj
[ 40%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/qrc_window_QT.cpp.obj
[ 40%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/opencv_highgui_automoc.cpp.obj
[ 40%] Linking CXX shared library ..\..\bin\libopencv_highgui300.dll
CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj):window_QT.cpp:(.text$_ZN11GuiReceiverD2Ev+0x27): undefined reference
to `_imp___ZN7QObjectD2Ev'
CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj):window_QT.cpp:(.text$_ZN11GuiReceiverD2Ev+0x3a): undefined reference
to `_imp___ZN7QObjectD2Ev'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj): bad reloc address 0x3a in section `.text$_ZN11GuiReceiverD2Ev'
collect2.exe: error: ld returned 1 exit status
modules\highgui\CMakeFiles\opencv_highgui.dir\build.make:203: recipe for target 'bin/libopencv_highgui300.dll' failed
mingw32-make[2]: *** [bin/libopencv_highgui300.dll] Error 1
CMakeFiles\Makefile2:4908: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I'm not yet familiar with OpenCV yet so I'm looking for any idea what problem might be?

Thank you very much.

Regards,

Peter

edit retag flag offensive close merge delete

Comments

as I'm reading link text In case of the Qt framework you need to build yourself the binary files, - I installed binaries and not build QT myself. It can cause problem?

peter_cz gravatar imagepeter_cz ( 2015-09-09 02:52:41 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-06-23 16:15:57 -0600

Hi, the build error associated with the highgui module happened the same to me, And even after I unchecked the option of OPENGL or OPENEXR, the build errors still appeared. That way doesn't work right for me. I'm really looking for any further helps because I already tried all kinds of solutions, significantly including uninstalling the opencv, QT and installing opencv 2.4.11 and qt 5.5.

edit flag offensive delete link more
0

answered 2016-01-26 08:50:09 -0600

zzx gravatar image

haha,my dear friend,your problem is the same to me and i solved it. I think you may not install opengl or OPENEXR, and you can uncheck with opengl and OPENEXR in cmake, and then configure and make it again, it will work well.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-07 07:33:27 -0600

Seen: 3,092 times

Last updated: Sep 07 '15