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

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
oufresh
Posts: 2
Joined: 2007-01-05 15:05

Opengl simple program, libraries error

#1 Post by oufresh »

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.

shoof
Posts: 379
Joined: 2006-09-08 20:41
Location: My chair

#2 Post by shoof »

with X.org libs are in /usr/lib/xorg/

oufresh
Posts: 2
Joined: 2007-01-05 15:05

#3 Post by oufresh »

Hi, I tried to compile with gcc -o glxsimple glxsimple.o -L/usr/lib/xorg -lGL -lX11 -lXext but I had the same error...

User avatar
runningwithscissors
Posts: 3
Joined: 2007-01-26 14:18

Re: Opengl simple program, libraries error

#4 Post by runningwithscissors »

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
That is because the 'X' in all glX functions is uppercase.
Happiness, is not being afraid. -- Roy Keane (supposedly)

Post Reply