HI! I'm using Debian testing and I'm trying to write some simple programs using Opengl with glx (X libraries). I have xorg 7.
I used to link the .o files with the options -L/usr/X11R6/lib -lGL -lXext -lX11, as written in the OpenGl manual.
Now, when I use the previous options, gcc returns the errors:
glxsimple.o: In function `redraw':
glxsimple.c:(.text+0x2f8): undefined reference to `glxSwapBuffers'
glxsimple.o: In function `main':
glxsimple.c:(.text+0x373): undefined reference to `glxQueryExtension'
glxsimple.c:(.text+0x3a8): undefined reference to `glxChooseVisual'
glxsimple.c:(.text+0x3d6): undefined reference to `glxChooseVisual'
glxsimple.c:(.text+0x430): undefined reference to `glxCreateContext'
glxsimple.c:(.text+0x59e): undefined reference to `glxMakeCurrent'
collect2: ld returned 1 exit status
It seems that it doesn't find the libglx!
Maybe whith xorg I have to use different options....
Thanks for help!
Mod edit: Disabled smilies since it messed up the post.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Opengl simple program, libraries error
- runningwithscissors
- Posts: 3
- Joined: 2007-01-26 14:18
Re: Opengl simple program, libraries error
That is because the 'X' in all glX functions is uppercase.oufresh wrote: Now, when I use the previous options, gcc returns the errors:
glxsimple.o: In function `redraw':
glxsimple.c:(.text+0x2f8): undefined reference to `glxSwapBuffers'
glxsimple.o: In function `main':
glxsimple.c:(.text+0x373): undefined reference to `glxQueryExtension'
glxsimple.c:(.text+0x3a8): undefined reference to `glxChooseVisual'
glxsimple.c:(.text+0x3d6): undefined reference to `glxChooseVisual'
glxsimple.c:(.text+0x430): undefined reference to `glxCreateContext'
glxsimple.c:(.text+0x59e): undefined reference to `glxMakeCurrent'
collect2: ld returned 1 exit status
Happiness, is not being afraid. -- Roy Keane (supposedly)