QGLWidget + unresolved external symbols
Verfasst: 22. Januar 2010 19:06
Hi ich verwendet Qt4.5 unter VS2008 auf windows 7.
Ich habe ein größeres Programm bei dem ich beim compilieren die folgenden Fehlermeldungen bekomme.
1>------ Build started: Project: gradientEditor, Configuration: Debug Win32 ------
1>Linking...
1> Creating library C:\...\Debug\gradientEditor.lib and object C:\...\Debug\gradientEditor.exp
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLFormat::~QGLFormat(void)" (__imp_??1QGLFormat@@QAE@XZ) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QGLFormat::setDefaultFormat(class QGLFormat const &)" (__imp_?setDefaultFormat@QGLFormat@@SAXABV1@@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setAlphaBufferSize(int)" (__imp_?setAlphaBufferSize@QGLFormat@@QAEXH@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setAlpha(bool)" (__imp_?setAlpha@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setStencil(bool)" (__imp_?setStencil@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setSampleBuffers(bool)" (__imp_?setSampleBuffers@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QGLFormat __cdecl QGLFormat::defaultFormat(void)" (__imp_?defaultFormat@QGLFormat@@SA?AV1@XZ) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QGLWidget::~QGLWidget(void)" (__imp_??1QGLWidget@@UAE@XZ) referenced in function __unwindfunclet$??0GLWidget@@QAE@PAVQWidget@@@Z$0
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLWidget::QGLWidget(class QGLFormat const &,class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>)" (__imp_??0QGLWidget@@QAE@ABVQGLFormat@@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z) referenced in function "public: __thiscall GLWidget::GLWidget(class QWidget *)" (??0GLWidget@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLFormat::QGLFormat(class QFlags<enum QGL::FormatOption>,int)" (__imp_??0QGLFormat@@QAE@V?$QFlags@W4FormatOption@QGL@@@@H@Z) referenced in function "public: __thiscall GLWidget::GLWidget(class QWidget *)" (??0GLWidget@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QGLWidget::metaObject(void)const " (?metaObject@QGLWidget@@UBEPBUQMetaObject@@XZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QGLWidget::qt_metacast(char const *)" (?qt_metacast@QGLWidget@@UAEPAXPBD@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QGLWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QGLWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QGLWidget::event(class QEvent *)" (?event@QGLWidget@@MAE_NPAVQEvent@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent@QGLWidget@@MAEXPAVQResizeEvent@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateGL(void)" (?updateGL@QGLWidget@@UAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateOverlayGL(void)" (?updateOverlayGL@QGLWidget@@UAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::initializeGL(void)" (?initializeGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeGL(int,int)" (?resizeGL@QGLWidget@@MAEXHH@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::paintGL(void)" (?paintGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::initializeOverlayGL(void)" (?initializeOverlayGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeOverlayGL(int,int)" (?resizeOverlayGL@QGLWidget@@MAEXHH@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::paintOverlayGL(void)" (?paintOverlayGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glInit(void)" (?glInit@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glDraw(void)" (?glDraw@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __thiscall QGLWidget::paintEngine(void)const " (?paintEngine@QGLWidget@@UBEPAVQPaintEngine@@XZ)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: void __thiscall QGLWidget::setAutoBufferSwap(bool)" (__imp_?setAutoBufferSwap@QGLWidget@@IAEX_N@Z) referenced in function "public: void __thiscall GLWidget::disableAutoBufferSwap(void)" (?disableAutoBufferSwap@GLWidget@@QAEXXZ)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLWidget::swapBuffers(void)" (__imp_?swapBuffers@QGLWidget@@QAEXXZ) referenced in function "protected: virtual void __thiscall ArthurFrame::paintEvent(class QPaintEvent *)" (?paintEvent@ArthurFrame@@MAEXPAVQPaintEvent@@@Z)
1>hoverpoints.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLWidget::swapBuffers(void)" (__imp_?swapBuffers@QGLWidget@@QAEXXZ)
1>C:\...\Debug\gradientEditor.dll : fatal error LNK1120: 28 unresolved externals
Ich habe hier schon so einen ähnlichen Post gefunden der wie ich auch vermutet habe bestätigt hat dass hier eigentlich der Pfad zur library fehlen könnte. Allerdings habe ich in VS beim Projekt den Pfad zum ../Qt4.5/lib directory angeben.
Gibts hier noch andere Ideen woran das liegen könnte?
Eventuell an der Qt Version? Aber dann sollten doch noch andere Fehler außer für das qglwidget kommen?!
Danke schon mal - lg
Ich habe ein größeres Programm bei dem ich beim compilieren die folgenden Fehlermeldungen bekomme.
1>------ Build started: Project: gradientEditor, Configuration: Debug Win32 ------
1>Linking...
1> Creating library C:\...\Debug\gradientEditor.lib and object C:\...\Debug\gradientEditor.exp
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLFormat::~QGLFormat(void)" (__imp_??1QGLFormat@@QAE@XZ) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QGLFormat::setDefaultFormat(class QGLFormat const &)" (__imp_?setDefaultFormat@QGLFormat@@SAXABV1@@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setAlphaBufferSize(int)" (__imp_?setAlphaBufferSize@QGLFormat@@QAEXH@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setAlpha(bool)" (__imp_?setAlpha@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setStencil(bool)" (__imp_?setStencil@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLFormat::setSampleBuffers(bool)" (__imp_?setSampleBuffers@QGLFormat@@QAEX_N@Z) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QGLFormat __cdecl QGLFormat::defaultFormat(void)" (__imp_?defaultFormat@QGLFormat@@SA?AV1@XZ) referenced in function "public: __thiscall ArthurFrame::ArthurFrame(class QWidget *)" (??0ArthurFrame@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QGLWidget::~QGLWidget(void)" (__imp_??1QGLWidget@@UAE@XZ) referenced in function __unwindfunclet$??0GLWidget@@QAE@PAVQWidget@@@Z$0
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLWidget::QGLWidget(class QGLFormat const &,class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>)" (__imp_??0QGLWidget@@QAE@ABVQGLFormat@@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z) referenced in function "public: __thiscall GLWidget::GLWidget(class QWidget *)" (??0GLWidget@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLFormat::QGLFormat(class QFlags<enum QGL::FormatOption>,int)" (__imp_??0QGLFormat@@QAE@V?$QFlags@W4FormatOption@QGL@@@@H@Z) referenced in function "public: __thiscall GLWidget::GLWidget(class QWidget *)" (??0GLWidget@@QAE@PAVQWidget@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QGLWidget::metaObject(void)const " (?metaObject@QGLWidget@@UBEPBUQMetaObject@@XZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QGLWidget::qt_metacast(char const *)" (?qt_metacast@QGLWidget@@UAEPAXPBD@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QGLWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QGLWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QGLWidget::event(class QEvent *)" (?event@QGLWidget@@MAE_NPAVQEvent@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent@QGLWidget@@MAEXPAVQResizeEvent@@@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateGL(void)" (?updateGL@QGLWidget@@UAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateOverlayGL(void)" (?updateOverlayGL@QGLWidget@@UAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::initializeGL(void)" (?initializeGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeGL(int,int)" (?resizeGL@QGLWidget@@MAEXHH@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::paintGL(void)" (?paintGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::initializeOverlayGL(void)" (?initializeOverlayGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeOverlayGL(int,int)" (?resizeOverlayGL@QGLWidget@@MAEXHH@Z)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::paintOverlayGL(void)" (?paintOverlayGL@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glInit(void)" (?glInit@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glDraw(void)" (?glDraw@QGLWidget@@MAEXXZ)
1>arthurwidgets.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __thiscall QGLWidget::paintEngine(void)const " (?paintEngine@QGLWidget@@UBEPAVQPaintEngine@@XZ)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: void __thiscall QGLWidget::setAutoBufferSwap(bool)" (__imp_?setAutoBufferSwap@QGLWidget@@IAEX_N@Z) referenced in function "public: void __thiscall GLWidget::disableAutoBufferSwap(void)" (?disableAutoBufferSwap@GLWidget@@QAEXXZ)
1>arthurwidgets.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLWidget::swapBuffers(void)" (__imp_?swapBuffers@QGLWidget@@QAEXXZ) referenced in function "protected: virtual void __thiscall ArthurFrame::paintEvent(class QPaintEvent *)" (?paintEvent@ArthurFrame@@MAEXPAVQPaintEvent@@@Z)
1>hoverpoints.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QGLWidget::swapBuffers(void)" (__imp_?swapBuffers@QGLWidget@@QAEXXZ)
1>C:\...\Debug\gradientEditor.dll : fatal error LNK1120: 28 unresolved externals
Ich habe hier schon so einen ähnlichen Post gefunden der wie ich auch vermutet habe bestätigt hat dass hier eigentlich der Pfad zur library fehlen könnte. Allerdings habe ich in VS beim Projekt den Pfad zum ../Qt4.5/lib directory angeben.
Gibts hier noch andere Ideen woran das liegen könnte?
Eventuell an der Qt Version? Aber dann sollten doch noch andere Fehler außer für das qglwidget kommen?!
Danke schon mal - lg