PDA

View Full Version : Compiling sample code on linux



01-18-2004, 01:39 PM
I have opengl installed on my linux mandrake 9.1 laptop, but when I try to compile the sample code, I get "undefined reference" for the gl commads. What am I doing wrong when compiling.

JanHH
01-18-2004, 01:43 PM
you need to link to the OpenGL library, something like

g++ abc.cpp -lGL

Jan

nexusone
01-18-2004, 02:48 PM
Sounds like you need to add the names of the openGL library's to the linker, so that it knows to use them.

Would look something like this:

-lGL -lGLU and if glut is used -lglut


Originally posted by kabrit1:
I have opengl installed on my linux mandrake 9.1 laptop, but when I try to compile the sample code, I get "undefined reference" for the gl commads. What am I doing wrong when compiling.