Ask Your Question
0

31 linkage errors while building OpenCV_world dll on VS2013 with Qt

asked 2016-07-28 17:06:55 -0600

leha-bot gravatar image

While building opencv_world as a DLL, Visual Studio shows me 31 linkage errors:

Error   28  error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall GuiReceiver::metaObject(void)const " (?metaObject@GuiReceiver@@UBEPBUQMetaObject@@XZ)  D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   29  error LNK2001: unresolved external symbol "public: virtual void * __thiscall GuiReceiver::qt_metacast(char const *)" (?qt_metacast@GuiReceiver@@UAEPAXPBD@Z)    D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   30  error LNK2001: unresolved external symbol "public: virtual int __thiscall GuiReceiver::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@GuiReceiver@@UAEHW4Call@QMetaObject@@HPAPAX@Z)   D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   31  error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvButtonbar::metaObject(void)const " (?metaObject@CvButtonbar@@UBEPBUQMetaObject@@XZ)  D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   32  error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvButtonbar::qt_metacast(char const *)" (?qt_metacast@CvButtonbar@@UAEPAXPBD@Z)    D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   33  error LNK2001: unresolved external symbol "public: virtual int __thiscall CvButtonbar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvButtonbar@@UAEHW4Call@QMetaObject@@HPAPAX@Z)   D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   34  error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvPushButton::metaObject(void)const " (?metaObject@CvPushButton@@UBEPBUQMetaObject@@XZ)    D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   35  error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvPushButton::qt_metacast(char const *)" (?qt_metacast@CvPushButton@@UAEPAXPBD@Z)  D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   36  error LNK2001: unresolved external symbol "public: virtual int __thiscall CvPushButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvPushButton@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   37  error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvCheckBox::metaObject(void)const " (?metaObject@CvCheckBox@@UBEPBUQMetaObject@@XZ)    D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   38  error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvCheckBox::qt_metacast(char const *)" (?qt_metacast@CvCheckBox@@UAEPAXPBD@Z)  D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   39  error LNK2001: unresolved external symbol "public: virtual int __thiscall CvCheckBox::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvCheckBox@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   40  error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvRadioButton::metaObject(void)const " (?metaObject@CvRadioButton@@UBEPBUQMetaObject@@XZ)  D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   41  error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvRadioButton::qt_metacast(char const *)" (?qt_metacast@CvRadioButton@@UAEPAXPBD@Z)    D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj    opencv_world
Error   42  error LNK2001: unresolved external symbol "public: virtual int __thiscall CvRadioButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvRadioButton@@UAEHW4Call@QMetaObject@@HPAPAX ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-07-25 08:11:22 -0600

et0803 gravatar image

@ MFmaniak You have done a good job! I just move the moc output file moc_window_QT.cpp to the dir ..\opencv-3.2.0\modules\world\src, and it work!

edit flag offensive delete link more
0

answered 2016-10-15 12:09:37 -0600

MFmaniak gravatar image

updated 2017-01-10 00:27:47 -0600

  1. Moc the file window_QT.h (moc.exe window_QT.h -o moc_window_QT.cpp).
  2. Include ..\opencv\3.1\sources\modules\highgui\src\moc_window_QT.cpp in solution.
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-28 17:06:55 -0600

Seen: 1,362 times

Last updated: Jan 10 '17