redhat 9 build problem

I got this error:
declare.linux:

c.compile.jogl.linux:

c.compile.jogl.check.nonmacosx:

c.compile.jogl.check.macosx:

c.compile.jogl.check:

c.compile.jogl:

c.link.jogl.check:

c.link.jogl:
[exec] /usr/bin/ld: cannot find -lGL
[exec] collect2: ld returned 1 exit status

BUILD FAILED
file:/home/xxx/java/jogl/make/build.xml:843: exec returned: 1

What can i do?
Thank you.

From that error, it can’t find libGL. Either you do not have the OpenGL package installed or your LIBDIR isn’t set correctly for the compiler to find it.

i have nvidia drivers and libGL.so file in /usr/lib and /usr/X11R6/lib is the problem opengl or LIBDIR.if LIBDIR how can i correct it.