Zieg, Mark wrote:

However, trying to link against those spat out lots of undefined
references:

 make[1]: Entering directory `/home/ziegm/opengl/teapot'
 g++ teapot.o -L/usr/X11R6/lib -lglut -lGLU -lGL -o teapot
 teapot.o:teapot.cpp:(.text+0xd2): undefined reference to
[EMAIL PROTECTED]'
 teapot.o:teapot.cpp:(.text+0xe1): undefined reference to
[EMAIL PROTECTED]'
 teapot.o:teapot.cpp:(.text+0x11d): undefined reference to
[EMAIL PROTECTED]'
 teapot.o:teapot.cpp:(.text+0x159): undefined reference to
[EMAIL PROTECTED]'
 teapot.o:teapot.cpp:(.text+0x1fe): undefined reference to
[EMAIL PROTECTED]'
 teapot.o:teapot.cpp:(.text+0x27c): undefined reference to
[EMAIL PROTECTED]'
 ...etc


You don't need X11 to compile the app on cygwin, unless the app was written for X11, in which case, you really have to link against the X11 libraries.


I guess that you need to link correctly with the w32api libraries. Try these out:


g++ teapot.o  /lib/w32api/libopengl32.a  /lib/w32api/libglu32.a \
   /lib/w32api/libgdi32.a  -lm -o teapot


If you want the binary to be native windows (i.e. does not depend on cygwin), you may want to try adding the -mno-cygwin option on your invocation to g++.

HTH.

Best Regards,

Carlo

--
Carlo Florendo
Astra Philippines Inc.
www.astra.ph

Reply via email to