On Wed, 30 Aug 2006, Bernhard Ege wrote:
I am trying to compile an opengl program and have managed to get all but
1 error to disappear:
gcc -o 3dtexture 3dtexture.c -lglut32 -lglu32 -lopengl32
/cygdrive/c/DOCUME~1/bme/LOCALS~1/Temp/ccAhs05G.o:3dtexture.c:(.text+0xa7b):
undefined reference to `_glTexImage3D@40'
collect2: ld returned 1 exit status
make: *** [3dtexture] Error 1
I have been unable to resolve this error. I did find _glTexImage3D in
/usr/X11R6/lib/libGL.dll.a but I have been unable to take advantage of it.
Am I missing something obvious? ;-)
Several things. You linked with -lglut32 -lglu32 -lopengl32 which are
Windows native libraries, but posted to the cygwin-xfree mailing list. As
such, you're off topic ;-). cygwin is the place to discuss these
libraries.
/usr/X11R6/lib/libGL.dll.a is the OpenGL for X11 and would be linked as
-L/usr/X11R6/lib -lGLU -lGL (I think that freeglut is now available for
X11 in Cygwin, but I have never used it).