I wonder a simple thing ...

My system is Linux Fedora core 3 complete installation, I wonder that the openGL library is installed in my OS automatically, or I should install it additionally, Thanks a lot!

probably yes… open a terminal and try:
rpm -qa | grep -i mesa

you will see wich mesa (-> opengl implementation for linux) libraries you have on your system.

It is very kind of you, thanks!
I typed the string, shows as following:
xorg-x11-Mesa-libGL-6.8.1-12.FC3.21
xorg-x11-Mesa-libGLU-6.8.1-12.FC3.21
Is that means openGL installed in my system, and vesion?

Definitely means you’ve got Mesa installed (Mesa version 6.8.1), not sure what OpenGL version that is (either 1.4 or 2.0, probably).

Depending on what you’re doing, you might want to find out if you’re using indirect or direct rendering (glxinfo should tell you this, among other things). Indirect rendering means you’re using Mesa’s software OpenGL implementation to do the rendering (this will be slow). Direct rendering means you’re using your hardware for rendering (you need to install and setup the appropriate drivers to have this working).

server glx version string: 1.2
client glx version string: 1.4
OpenGL version string: 1.3 Mesa 6.1
glu version: 1.3

But I edit an example and compile, so many undefined references…

What happened?

Thanks all!

server glx version string: 1.2
client glx version string: 1.4
OpenGL version string: 1.3 Mesa 6.1
glu version: 1.3

But I edit an example and compile, so many undefined references…

What happened?

Thanks all!

link against the libraries.

something like that: gcc main.c -o test -lopengl…

I compile my opengl c file:firstGraph.c like this:
gcc firstGraph.c -lglut -ffast-math -lMesaGLU -lMesaGL -lm -L/usr/X11/lib
-L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -o firstGraph

but failed, it shows: cannot find -lMesaGLU. my Mesa have installed, and I don’t know why.