View Full Version : problem with compiling source code
02-19-2001, 12:08 PM
I have problems with it compiling of my openGL source code.
I type in my terminal:
gcc -o cube cube.c -L/usr/X11R6/lib/ -Wall -lX11 -lXi -lXmu -lglut -lMesaGL -lMesaGLU -lm
02-19-2001, 12:20 PM
What kind of problems is gcc reporting?
Examples or error messages would be nice.
I'm not sure it is realy realated but
you should use
-lGL instead of -lMesaGL
with this your program 'll be able to use hardware acceleration.
if it is a linking problem, as
??? undefined reference to glVertex....
check if you have really the needed librairies in /usr/lib libGL... libGLU
or if you use mesa libMesaGL and libMesaGLU
On my system i have the two with in fact symlink beetween them
When i compile i use:
gcc cube.c cube -L/usr/X11R6/lib -Wall -lX11 -lXext -lXmu -lGL -lGLU -lglut
next time you should give more details, because with this we can't know if it is a gcc problem or your code http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.