[DC LoCo] [OT] A gcc Linker, wxWidgets and OpenGL Question

Michael Haney thezorch at gmail.com
Tue Jan 24 00:22:50 UTC 2012


This is more of a Windows question than a Linux one, but I know a few
of you are developers on LInux and Windows.
A friend of mine is having trouble with the gcc linker, wxWidgets and
OpenGL. Here's the text he sent me to post in a few places I know
might be able to help.

----------
I am trying to run the samples/openGL/cube demo.
I am having a link error between OpenGL and wxCanvas. I have read up
more on linker parameters, but I am stumped.
I am using:
* Eclipse Version: Indigo Service Release 1 Build id: 20110916-0149
* CDT Eclipse C/C++ Development Tools Version: 8.0.0.201109151620
Build id: @build@
* GCC 4.6.1 (minGW) MSYS 1.0
* OpenGL 4.0
* wxWidgets 2.8.12
I have managed to get everything else in this hamburger sandwich of
software to work except for the following message:

g++ src\StarSkimmer.o -lglu32 -lopengl32 -LD:\Dev\Apps\wxWidgets\lib
-L/d/Dev/Apps/wxWidgets/lib -mthreads -Wl,--subsystem,windows
-mwindows d:\Dev\Apps\wxWidgets\lib\libwx_mswu-2.8.a -lwxregexu-2.8
-lwxexpat-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lwxzlib-2.8
-lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32
-lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32
-LD:\Dev\Apps\wxWidgets\lib -lwx_mswu_gl-2.8 -oStarSkimmer.exe
D:\Dev\Apps\wxWidgets\lib/libwx_mswu_gl-2.8.a(gllib_msw_glcanvas.o):glcanvas.cpp:(.text+0x329):
undefined reference to wglDeleteContext at 4'
D:\Dev\Apps\wxWidgets\lib/libwx_mswu_gl-2.8.a(gllib_msw_glcanvas.o):glcanvas.cpp:(.text+0x624):
undefined reference towglCreateContext at 4'
D:\Dev\Apps\wxWidgets\lib/libwx_mswu_gl-2.8.a(gllib_msw_glcanvas.o):glcanvas.cpp:(.text+0x63f):
undefined reference to wglShareLists at 8'
D:\Dev\Apps\wxWidgets\lib/libwx_mswu_gl-2.8.a(gllib_msw_glcanvas.o):glcanvas.cpp:(.text+0x680):
undefined reference towglMakeCurrent at 8'
D:\Dev\Apps\wxWidgets\lib/libwx_mswu_gl-2.8.a(gllib_msw_glcanvas.o):glcanvas.cpp:(.text+0x118e):
undefined reference to `glColor3f at 12' collect2: ld returned 1 exit
status Build error occurred, build is stopped Time consumed: 2597 ms.

Any and all help would be appreciated.
Thanks!
----------

Our ultimate goal is to develop cross-platform games (Windows, Mac,
Linux, Android) using C++ and OpenGL with wxWidgets as the windowing
system.
Any advice would be appreciated. If you need additional information,
let me know in a reply and I'll get the info from him.

-- 
Michael "TheZorch" Haney
https://sites.google.com/site/thezorch/

Let Hollywood Die, call your Congressman now and tell them its not
their job to save the failing business model of a industry that
refuses to adapt.

Break some Windows, bring freedom to your PC. www.ubuntu.com



More information about the Ubuntu-us-dc mailing list