Error when compiling (linking) opencv Highgui with mingw

asked 2018-09-11 04:58:45 -0600

Hello, i have tried for hours now to compile the opencv files. i followed the guide here (https://wiki.qt.io/How_to_setup_Qt_an...) and trying to get it working with QT. i also turned off BUILD_PROTOBUF and BUILD_opencv_videoio. When i compile i get a huge error message at "[ 88%] Linking CXX shared library ....\bin\libopencv_highgui343.dll". Here is the first few lines of the error message:

CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj):window_QT.cpp:(.text$_ZN10CvWinModelD1Ev[__ZN10CvWinModelD1Ev]+0xf): undefined reference to _imp___ZN7QWidgetD2Ev' CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj):window_QT.cpp:(.text$_ZN10CvWinModelD0Ev[__ZN10CvWinModelD0Ev]+0x15): undefined reference to_imp___ZN7QWidgetD2Ev' CMakeFiles\opencv_highgui.dir/objects.a(window_QT.cpp.obj):window_QT.cpp:(.text$_ZN14OpenGlViewPort7setSizeE5QSize+0x13): undefined reference to `_imp___ZN7QWidget14updateGeometryEv'

And that continues for miles. I hope someone can help me cause im in the dark here.

im on a windows 10 64, with intel i5-7300HQ

Thanks!

edit retag flag offensive close merge delete

Comments

do you absolutely need qt support ?

(it also seems, your qt version does not match, what the highgui bindinnngs expect)

berak gravatar imageberak ( 2018-09-11 05:20:55 -0600 )edit

Im using this for a course so yes, i need qt. So it might be my Qt installation that is wrong version?

helsing112@hotmail.com gravatar image[email protected] ( 2018-09-11 05:25:01 -0600 )edit

So it might be my Qt installation that is wrong version?

that's what i am suspecting. (but i never used this, so idk.)

i also turned off BUILD_PROTOBUF and BUILD_opencv_videoio

no, don't do that, it's entirely unrelated. and you probably NEED a webcam, while you for sure dont NEED extra qt functionality

berak gravatar imageberak ( 2018-09-11 06:54:12 -0600 )edit

I know i dont need qt functionality, but it makes it easier in class. thanks for the anwsers, ill try to install an earlier version of Qt.

helsing112@hotmail.com gravatar image[email protected] ( 2018-09-11 07:22:59 -0600 )edit