View Full Version : problems compiling
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
03-06-2001, 12:05 PM
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
04-04-2002, 06:13 AM
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. http://www.opengl.org/discussion_boards/ubb/smile.gif
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
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.