From: "Mehamli, Tristan" on
Hi everyone,
I'm using OpenGL with wxWidgets and everything is compiling fine except
during the linking process. I had these errors :


1>Linking...
1>OGLCanvas.obj : error LNK2001: unresolved external symbol "protected:
static struct wxEventTable const wxGLCanvas::sm_eventTable"
(?sm_eventTable(a)wxGLCanvas@@1UwxEventTable@@B)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall wxGLCanvas::~wxGLCanvas(void)"
(??1wxGLCanvas@@UAE(a)XZ) referenced in function
__unwindfunclet$??0OGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@J
ABVwxString@@@Z$0
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
__thiscall wxGLCanvas::wxGLCanvas(class wxWindow *,int,class wxPoint
const &,class wxSize const &,long,class wxString const &,int *,class
wxPalette const &)"
(??0wxGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@P
AHABVwxPalette@@@Z) referenced in function "public: __thiscall
OGLCanvas::OGLCanvas(class wxWindow *,int,class wxPoint const &,class
wxSize const &,long,class wxString const &)"
(??0OGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z
)
1>OGLCanvas.obj : error LNK2001: unresolved external symbol "public:
virtual class wxClassInfo * __thiscall
wxGLCanvas::GetClassInfo(void)const "
(?GetClassInfo(a)wxGLCanvas@@UBEPAVwxClassInfo@@XZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall OGLCanvas::~OGLCanvas(void)" (??1OGLCanvas@@UAE(a)XZ)
referenced in function "public: virtual void * __thiscall
OGLCanvas::`scalar deleting destructor'(unsigned int)"
(??_GOGLCanvas@@UAEPAXI@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glEnd@0 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glVertex3i(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glNormal3f(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glColor3f(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glBegin@4 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::SwapBuffers(void)"
(?SwapBuffers(a)wxGLCanvas@@QAEXXZ) referenced in function "protected:
void __thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glFlush@0 referenced in function "protected: void __thiscall
OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMultMatrixf@4 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glTranslatef(a)12 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glLoadIdentity@0 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glClear@4 referenced in function "protected: void __thiscall
OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glClearColor(a)16 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::SetCurrent(void)"
(?SetCurrent(a)wxGLCanvas@@QAEXXZ) referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::OnSize(class wxSizeEvent &)"
(?OnSize(a)wxGLCanvas@@QAEXAAVwxSizeEvent@@@Z) referenced in function
"protected: void __thiscall OGLCanvas::OnSize(class wxSizeEvent &)"
(?OnSize(a)OGLCanvas@@IAEXAAVwxSizeEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMaterialfv(a)12 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glColorMaterial@8 referenced in function "private: void
__thiscall OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glLightfv(a)12 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glHint@8 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glShadeModel@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glEnable@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glDisable@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
_gluPerspective(a)32 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMatrixMode@4 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glViewport(a)16 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>\\...\OGLWxW\Debug\OGLWxW.exe : fatal error LNK1120: 29 unresolved
externals
1>Build log was saved at "...\OGLWxW\OGLWxW\Debug\BuildLog.htm"
1>OGLWxW - 30 error(s), 0 warning(s)

Does someone know what the problem is?
I'm using VC 2005 on XP + SP2, on a core 2 duo.

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Mehamli, Tristan" on
I fixed the problem. In the project properties, I forgot to add to in
the linkler->input the additional lib wxmsw28d_gl.lib for debug and
wxmsw28_gl.lib for release.

-----Original Message-----
From: Mehamli, Tristan [mailto:tmehamli(a)mc.com]
Sent: mercredi 2 mai 2007 10:19
To: wx-users(a)lists.wxwidgets.org
Subject: Linking errors using OpenGL

Hi everyone,
I'm using OpenGL with wxWidgets and everything is compiling fine except
during the linking process. I had these errors :


1>Linking...
1>OGLCanvas.obj : error LNK2001: unresolved external symbol "protected:
static struct wxEventTable const wxGLCanvas::sm_eventTable"
(?sm_eventTable(a)wxGLCanvas@@1UwxEventTable@@B)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall wxGLCanvas::~wxGLCanvas(void)"
(??1wxGLCanvas@@UAE(a)XZ) referenced in function
__unwindfunclet$??0OGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@J
ABVwxString@@@Z$0
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
__thiscall wxGLCanvas::wxGLCanvas(class wxWindow *,int,class wxPoint
const &,class wxSize const &,long,class wxString const &,int *,class
wxPalette const &)"
(??0wxGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@P
AHABVwxPalette@@@Z) referenced in function "public: __thiscall
OGLCanvas::OGLCanvas(class wxWindow *,int,class wxPoint const &,class
wxSize const &,long,class wxString const &)"
(??0OGLCanvas@@QAE(a)PAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z
)
1>OGLCanvas.obj : error LNK2001: unresolved external symbol "public:
virtual class wxClassInfo * __thiscall
wxGLCanvas::GetClassInfo(void)const "
(?GetClassInfo(a)wxGLCanvas@@UBEPAVwxClassInfo@@XZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
virtual __thiscall OGLCanvas::~OGLCanvas(void)" (??1OGLCanvas@@UAE(a)XZ)
referenced in function "public: virtual void * __thiscall
OGLCanvas::`scalar deleting destructor'(unsigned int)"
(??_GOGLCanvas@@UAEPAXI@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glEnd@0 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glVertex3i(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glNormal3f(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glColor3f(a)12 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glBegin@4 referenced in function "private: void __thiscall
OGLCanvas::drawScene(void)" (?drawScene(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::SwapBuffers(void)"
(?SwapBuffers(a)wxGLCanvas@@QAEXXZ) referenced in function "protected:
void __thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glFlush@0 referenced in function "protected: void __thiscall
OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMultMatrixf@4 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glTranslatef(a)12 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glLoadIdentity@0 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glClear@4 referenced in function "protected: void __thiscall
OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glClearColor(a)16 referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::SetCurrent(void)"
(?SetCurrent(a)wxGLCanvas@@QAEXXZ) referenced in function "protected: void
__thiscall OGLCanvas::OnPaint(class wxPaintEvent &)"
(?OnPaint(a)OGLCanvas@@IAEXAAVwxPaintEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol "public:
void __thiscall wxGLCanvas::OnSize(class wxSizeEvent &)"
(?OnSize(a)wxGLCanvas@@QAEXAAVwxSizeEvent@@@Z) referenced in function
"protected: void __thiscall OGLCanvas::OnSize(class wxSizeEvent &)"
(?OnSize(a)OGLCanvas@@IAEXAAVwxSizeEvent@@@Z)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMaterialfv(a)12 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glColorMaterial@8 referenced in function "private: void
__thiscall OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glLightfv(a)12 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glHint@8 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glShadeModel@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glEnable@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glDisable@4 referenced in function "private: void __thiscall
OGLCanvas::initOpenGL(void)" (?initOpenGL(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
_gluPerspective(a)32 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glMatrixMode@4 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>OGLCanvas.obj : error LNK2019: unresolved external symbol
__imp__glViewport(a)16 referenced in function "private: void __thiscall
OGLCanvas::resetProjectionMode(void)"
(?resetProjectionMode(a)OGLCanvas@@AAEXXZ)
1>\\...\OGLWxW\Debug\OGLWxW.exe : fatal error LNK1120: 29 unresolved
externals
1>Build log was saved at "...\OGLWxW\OGLWxW\Debug\BuildLog.htm"
1>OGLWxW - 30 error(s), 0 warning(s)

Does someone know what the problem is?
I'm using VC 2005 on XP + SP2, on a core 2 duo.

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org