[osg-users] [build] Linker errors when building with OSG_USE_QT

Sam Hecht samuel_hecht at brown.edu
Mon Jan 18 14:53:43 PST 2016


Hi,

I have built OSG with CMake3.4.1 and VS2015 on Windows 10 already, however, I now want to build it to use Qt so I can incorporate it into Qt projects. I check off the OSG_USE_QT variable in CMake (I use the GUI) and generate just fine. However, when I build the solution in VS2015, I get a whole bunch of linker errors for the Qt and Qt-related projects (I was going to post a pastebin link to the errors, but I can't post links here, so here are a few of the errors; there are ~1400 of them):

2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutex::QMutex(enum QMutex::RecursionMode)" (__imp_??0QMutex@@QAE at W4RecursionMode@0@@Z) referenced in function "public: __thiscall osgQt::GLWidget::GLWidget(class QGLFormat const &,class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>,bool)" (??0GLWidget at osgQt@@QAE at ABVQGLFormat@@PAVQWidget@@PBVQGLWidget@@V?$QFlags at W4WindowType@Qt@@@@_N at Z)
2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutex::~QMutex(void)" (__imp_??1QMutex@@QAE at XZ) referenced in function __unwindfunclet$??0GLWidget at osgQt@@QAE at ABVQGLFormat@@PAVQWidget@@PBVQGLWidget@@V?$QFlags at W4WindowType@Qt@@@@_N at Z$1
2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QMutex::lock(void)" (__imp_?lock at QMutex@@QAEXXZ) referenced in function "protected: void __thiscall osgQt::GLWidget::enqueueDeferredEvent(enum QEvent::Type,enum QEvent::Type)" (?enqueueDeferredEvent at GLWidget@osgQt@@IAEXW4Type at QEvent@@0 at Z)
2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QMutexLocker::~QMutexLocker(void)" (__imp_??1QMutexLocker@@QAE at XZ) referenced in function "protected: void __thiscall osgQt::GLWidget::enqueueDeferredEvent(enum QEvent::Type,enum QEvent::Type)" (?enqueueDeferredEvent at GLWidget@osgQt@@IAEXW4Type at QEvent@@0 at Z)
2>GraphicsWindowQt.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QByteArray::~QByteArray(void)" (__imp_??1QByteArray@@QAE at XZ) referenced in function "public: static struct osg::GraphicsContext::Traits * __cdecl osgQt::GraphicsWindowQt::createTraits(class QGLWidget const *)" (?createTraits at GraphicsWindowQt@osgQt@@SAPAUTraits at GraphicsContext@osg@@PBVQGLWidget@@@Z)

Any help is greatly appreciated.

Thank you!

Sam

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66043#66043







More information about the osg-users mailing list