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.
you need to link to the OpenGL library, something like
g++ abc.cpp -lGL
Jan
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.