Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.2.7.0.20010112120735.00b1f410@irispavp.igb.umontreal.ca> X-Sender: bleau2 AT irispavp DOT igb DOT umontreal DOT ca X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Fri, 12 Jan 2001 12:16:57 -0500 To: cygwin AT sources DOT redhat DOT com From: Andre Bleau Subject: Re: Compiling OpenGL applications Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id MAA23590 The GL/gl.h file was not writen with -mno-cygwin in mind. You could get arround the problem by editing /usr/include/GL/gl.h as follow: find a block like the following near the head of the file: --------------- SNIP --------------- #if defined(__CYGWIN__) # ifndef APIENTRY # define APIENTRY __attribute__ ((__stdcall__)) # define GL_APIENTRY_DEFINED # endif /* define APIENTRY to null string if we aren't on Cygwin */ #else # define APIENTRY # define GL_APIENTRY_DEFINED #endif --------------- SNAP --------------- and replace it with this: --------------- SNIP --------------- #if defined(__CYGWIN__) # ifndef APIENTRY # define APIENTRY __attribute__ ((__stdcall__)) # define GL_APIENTRY_DEFINED # endif /* define APIENTRY to null string if we aren't on Cygwin and it is not defined */ #else # ifndef APIENTRY # define APIENTRY # define GL_APIENTRY_DEFINED # endif #endif --------------- SNAP --------------- This fix will be included in the next release of the package. André Bleau, opengl package maintainer. >I just managed to make the import library and compile some code which uses wgl >but I still have some problems: > >When I try to compile with -mwindows I get: >--------- >/usr/bin/ld: warning: cannot find entry symbol _WinMainCRTStartup; defaulting >to 00401000 >--------- > >Compiling with -mno-cygwin gives following errors: >--------- >In file included from wgl.c:6: >/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/../../../../include/GL/gl.h:44: >warning: `APIENTRY' redefined >/usr/include/w32api/windef.h:85: warning: this is the location of the previous >definition >--------- >and lots of something like this: >--------- >/cygdrive/c/WINDOWS/TEMP/ccRyOrHc.o(.text+0x495):wgl.c: undefined reference to >`glViewport' >/cygdrive/c/WINDOWS/TEMP/ccRyOrHc.o(.text+0x4b7):wgl.c: undefined reference to >`glMatrixMode' >/cygdrive/c/WINDOWS/TEMP/ccRyOrHc.o(.text+0x4bf):wgl.c: undefined reference to >`glLoadIdentity' >/cygdrive/c/WINDOWS/TEMP/ccRyOrHc.o(.text+0x4f1):wgl.c: undefined reference to >`gluPerspective' >--------- > >Without these switches everything works fine. > André Bleau, ing. email: bleau at igb dot umontreal dot ca (Fight SPAM: encode your email-address) -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple