I am just getting started with some opengl and I downloaded and installed all the Mesa libraries and the glut and all the demos work fine but when I try to compile i get all sorts of errors that I don’t get. I have used many different options and tried plowing though the makefiles but I can’t find out what the problem is.
The types of errors i am getting
/tmp/ccuagezN.o(.text+0xca): undefined reference to ‘glClearColor’
and I have one of these for each call to an opengl routine
This is a common newbie mistake. You’re not linking in the libraries. From your post it sounds as if you are compiling this with Linux? Add the parameters -lglut -lGL -lGLU to your gcc/g++ call and you should be good to go.
Thank you very much that did the trick
I have the same problem, however in addition to the unreferenced errors I get /usr/bin/ld: cannot find lglut
I’ve been away from posting at the boards for awhile and am just now getting back into browsing them. You can imagine my suprise when I saw that an old thread I had posted in had sufaced into the recent posts again.
Anyway, since I’m here, it sounds like you don’t have the Glut libraries. I’ve never tried installing them in Linux before so I can’t help much with that except to give this link. http://www.opengl.org/developers/documentation/glut.html