This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glTexImage3D missing?


Brian Ford wrote:
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).

Thanks. I tried to link with GL, GLU and glut but linking kept failing.


It turns out that cygwins make doesn't behave like it does with linux.

This e.g. fails (but this is the default Makefile behaviour):

gcc -I/usr/X11R6/include -L/usr/X11R6/lib -lglut -lGLU -lGL 3dtexture.c -o 3dtexture

Makefile:

3dtexture: 3dtexture.c

This succeeds (compileline looks proper):

gcc -I/usr/X11R6/include -o 3dtexture 3dtexture.c -L/usr/X11R6/lib -lglut -lGLU -lGL

Makefile:

3dtexture: 3dtexture.c
	gcc $(CFLAGS)  -o $@ $^ $(LDFLAGS)

My program almost works correctly but there is one problem. I'll try to isolate it and report it here when (if) I find it.

Microsoft's OpenGL is version 1.1.  glTexImage3D is not a version 1.1
feature.  You need to learn how to load extensions and look at
EXT_texture3d and glTexImage3DEXT.


Thanks again. I knew glTexImage3D wasn't a 1.1 feature, but since I had so many problems compiling opengl with cygwin, I ended up linking with the windows libraries. I did try to load glTexImage3D but kept failing. I'll try using you hints to work out a solution using the windows libraries.


Bernhard

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]