Hi

I write a simple program to run the opengl in the Qt 4.8.
IDE: VS 2008 with Qt 4.8 Addin
Included gl.h and QGLWidget
I included all the lib in the Linker section
(opengl32.lib glew32d.lib QtCore4.lib qtmain.lib)

I am getting the below error


1>myGLWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLWidget::QGLWidget(class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>)" (__imp_??0QGLWidget@@QAE@PAVQWidget@@PBV0@V?$QFlag s@W4WindowType@Qt@@@@@Z) referenced in function "public: __thiscall GLWidget::GLWidget(class QWidget *)" (??0GLWidget@@QAE@PAVQWidget@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall GLWidget::metaObject(void)const " (?metaObject@GLWidget@@UBEPBUQMetaObject@@XZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall GLWidget::qt_metacast(char const *)" (?qt_metacast@GLWidget@@UAEPAXPBD@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall GLWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@GLWidget@@UAEHW4Call@QMetaObject@@HP APAX@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QGLWidget::event(class QEvent *)" (?event@QGLWidget@@MAE_NPAVQEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QWidget::setVisible(bool)" (?setVisible@QWidget@@UAEX_N@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWidget::sizeHint(void)const " (?sizeHint@QWidget@@UBE?AVQSize@@XZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWidget::minimumSizeHint(void)const " (?minimumSizeHint@QWidget@@UBE?AVQSize@@XZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWidget::heightForWidth(int)const " (?heightForWidth@QWidget@@UBEHH@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent@QWidget@@MAEXPAVQMouseEvent@@@ Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent@QWidget@@MAEXPAVQMouseEven t@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::wheelEvent(class QWheelEvent *)" (?wheelEvent@QWidget@@MAEXPAVQWheelEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent@QWidget@@MAEXPAVQKeyEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::focusInEvent(class QFocusEvent *)" (?focusInEvent@QWidget@@MAEXPAVQFocusEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::focusOutEvent(class QFocusEvent *)" (?focusOutEvent@QWidget@@MAEXPAVQFocusEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::enterEvent(class QEvent *)" (?enterEvent@QWidget@@MAEXPAVQEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::leaveEvent(class QEvent *)" (?leaveEvent@QWidget@@MAEXPAVQEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget:aintEvent(class QPaintEvent *)" (?paintEvent@QGLWidget@@MAEXPAVQPaintEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::moveEvent(class QMoveEvent *)" (?moveEvent@QWidget@@MAEXPAVQMoveEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent@QGLWidget@@MAEXPAVQResizeEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::closeEvent(class QCloseEvent *)" (?closeEvent@QWidget@@MAEXPAVQCloseEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent@QWidget@@MAEXPAVQContextMenuEve nt@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::tabletEvent(class QTabletEvent *)" (?tabletEvent@QWidget@@MAEXPAVQTabletEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::actionEvent(class QActionEvent *)" (?actionEvent@QWidget@@MAEXPAVQActionEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent@QWidget@@MAEXPAVQDragEnterEvent@@ @Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent@QWidget@@MAEXPAVQDragMoveEvent@@@Z )
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent@QWidget@@MAEXPAVQDragLeaveEvent@@ @Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dropEvent(class QDropEvent *)" (?dropEvent@QWidget@@MAEXPAVQDropEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::showEvent(class QShowEvent *)" (?showEvent@QWidget@@MAEXPAVQShowEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::hideEvent(class QHideEvent *)" (?hideEvent@QWidget@@MAEXPAVQHideEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWidget::winEvent(struct tagMSG *,long *)" (?winEvent@QWidget@@MAE_NPAUtagMSG@@PAJ@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::changeEvent(class QEvent *)" (?changeEvent@QWidget@@MAEXPAVQEvent@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent@QWidget@@MAEXPAVQInputMethodEve nt@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual class QVariant __thiscall QWidget::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery@QWidget@@UBE?AVQVariant@@W4Inpu tMethodQuery@Qt@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWidget::focusNextPrevChild(bool)" (?focusNextPrevChild@QWidget@@MAE_N_N@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::styleChange(class QStyle &)" (?styleChange@QWidget@@MAEXAAVQStyle@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::enabledChange(bool)" (?enabledChange@QWidget@@MAEX_N@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget:aletteChange(class QPalette const &)" (?paletteChange@QWidget@@MAEXABVQPalette@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::fontChange(class QFont const &)" (?fontChange@QWidget@@MAEXABVQFont@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::windowActivationChange(bool)" (?windowActivationChange@QWidget@@MAEX_N@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::languageChange(void)" (?languageChange@QWidget@@MAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateGL(void)" (?updateGL@QGLWidget@@UAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGLWidget::updateOverlayGL(void)" (?updateOverlayGL@QGLWidget@@UAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::initializeOverlayGL(void)" (?initializeOverlayGL@QGLWidget@@MAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::resizeOverlayGL(int,int)" (?resizeOverlayGL@QGLWidget@@MAEXHH@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget:aintOverlayGL(void)" (?paintOverlayGL@QGLWidget@@MAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glInit(void)" (?glInit@QGLWidget@@MAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QGLWidget::glDraw(void)" (?glDraw@QGLWidget@@MAEXXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWidget::devType(void)const " (?devType@QWidget@@UBEHXZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __thiscall QGLWidget:aintEngine(void)const " (?paintEngine@QGLWidget@@UBEPAVQPaintEngine@@XZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual struct HDC__ * __thiscall QWidget::getDC(void)const " (?getDC@QWidget@@UBEPAUHDC__@@XZ)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QWidget::releaseDC(struct HDC__ *)const " (?releaseDC@QWidget@@UBEXPAUHDC__@@@Z)
1>myGLWidget.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall QWidget::metric(enum QPaintDevice::PaintDeviceMetric)const " (?metric@QWidget@@MBEHW4PaintDeviceMetric@QPaintDe vice@@@Z)
1>myGLWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall QMouseEvent::x(void)const " (__imp_?x@QMouseEvent@@QBEHXZ) referenced in function "protected: virtual void __thiscall GLWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent@GLWidget@@MAEXPAVQMouseEvent@@@Z)
1>myGLWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall QMouseEvent::y(void)const " (__imp_?y@QMouseEvent@@QBEHXZ) referenced in function "protected: virtual void __thiscall GLWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent@GLWidget@@MAEXPAVQMouseEvent@@@Z)
1>myGLWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QWidget::close(void)" (__imp_?close@QWidget@@QAE_NXZ) referenced in function "protected: virtual void __thiscall GLWidget::keyPressEvent(class QKeyEvent *)" (?keyPressEvent@GLWidget@@MAEXPAVQKeyEvent@@@Z)
1>myGLWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall QKeyEvent::key(void)const " (__imp_?key@QKeyEvent@@QBEHXZ) referenced in function "protected: virtual void __thiscall GLWidget::keyPressEvent(class QKeyEvent *)" (?keyPressEvent@GLWidget@@MAEXPAVQKeyEvent@@@Z)
1>E:\Remaining\C++_Practice\OpenGl_Practice\sample 1\Debug\sample1.exe : fatal error LNK1120: 64 unresolved externals


Could you please help on what are the remaining libraries i need to mention in order to run opengl in the qt successfully