What are the exact compiler commands for compiling a opengl code?

I downloaded mesa, and installed it without problems. And now, how can I install a simple test source code. You know , with glut or opengl.
what is the exact command to compile a glut program , or opengl ??
Which libs will i need ?

first… if you have a NVIDIA card… forget MESA.

The compile should be something like

gcc -lGL -lglut -o destinyName sorce.cc

I use SDL , not glut so is -lSDL -lpthread insteda of -lglut

If you want optimizations include -o3. If your machine is an Athlon include -march=athlon if it is a P4 include -march=i686

to use MMX include -mmmx, to use SSE include -msse

O.k i compiled a mesa demo source succesfull.
It was the bounce source code.
with the command
gcc -o bounce bounce.c -lglut -lGL -lGLU -lm
But when I whant execute the bin, there is an error message:
GLUT: FATAL Error in bounce: OpenGL GLX extension not supported by display : : 0.0
ehh ???

I do not use MESA… so I am guessing… looks like MESA cannot provide an extension that is needed by GLUT

Well, you need to enable GLX support for
XFree. Do that in xfree config file in
/etc/ dir.

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