Compiling GLUT with KDevelop

Hi, Im reasonably new to linux and having been trying to compile and run a Glut example. Sadly this is all that i ever get.

*/home/alistair/Projects/openglexample/src/openglexample.c:28: undefined reference to `glClear’



**** Exited with status: 2 ***

I have done everything from including and linking the correct headers/libs in KDevelop to also adding them into the configure.in file.

I have been able to create object files but i always seem to have problems linking.

Any help would be most appreciated

thanks in advance

Missing -lGLU -lGL in Makefile

As mentioned - it usually is missing glut, GL and GLU libraries.

Also have you installed required libraries and header files? Mesa etc?

Do u get only glClear error or any gl* Call?
if not then check code.

Try compile code cmd line : gcc -o out_file in_file -lglut -lGL -lGLU , assuming u don’t have any GUI stuff :frowning:

bye
km

try this
-L/usr/X11R6/lib -lGL -lGLU

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.