View Full Version : How do i Compile ?
Hey ! I have the Red Book and I couldn't get past even the first Glut example program. THe program includes the glut.h and stdlib.h and nothing else. But it doesn't compile. Undefined references to all functions (now is that weird or is that weird)
I'm tryin to do it on Linux and i DID try to link is against the libglut.so.3.7.something explicitly, but no help ! SO maybe YOU could help.
Mebbe I'm stupid, but then i'll admit it too ! http://www.opengl.org/discussion_boards/ubb/biggrin.gif
You also need to link against libGL and possibly libGLU:
gcc .... -lGL -lGLU -lglut
Hope this helps.
hey thanx ! i DID try that (now when you said it)... but I'm still stuck with the same problem http://www.opengl.org/discussion_boards/ubb/frown.gif
Now it blabs about some undefined references to functions like...XFreePixmap, XSetWMProtocols .. etc.
the problem is.. it's giving me a LOT of undefined function references n now i'm totally lost ! http://www.opengl.org/discussion_boards/ubb/frown.gif help me out please.
thanx ! (er yeah i'm a newbie !!)
05-05-2001, 09:55 PM
I haven't run any of my programs on Linux for a while now, but the next library to link in would be -lX11 for the X windows library. There may be more libraries you need to link, like you need to explicitly link in the maths library if you're using it (-lm) and there are others depending on what you're including in your program.
rts will be able to help better than me though - he's a regular Linux user (I think).
Hope that helps.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.