Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-Id: <4.3.2.7.0.20010216162440.00b2d230@irispavp.igb.umontreal.ca>
X-Sender: bleau2@irispavp.igb.umontreal.ca
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Fri, 16 Feb 2001 16:41:16 -0500
To: cygwin@sources.redhat.com
From: Andre Bleau <bleau@igb.umontreal.ca>
Subject: Re: OpenGL, -mno-cygwin AND GLUT
Cc: CaetSith7@aol.com
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 RAA30503


>First of all, thanks for the fix Andre.  However, I have a new problem 
>related to GLUT.  I tried looking again through the archives, but no beans.
>
>#gcc code.C -I /usr/include -lopengl32 -lglu32 -lglut32
>
>works fine.  But,
>
>#gcc -mno-cgywin code.C -I /usr/include -lopengl32 -lglu32 -lglut32
>
>gives undefined references to '__glutInitWithExit@12', 
>'__glutCreateWindowWithExit@8' and '__glutCreateMenuWithExit@8'.
>
>I was thinking either I needed to include the -mwindows flag, but that 
>didn't help, neither did using g++ and I couldn't find a similar hack for 
>glut.h like the one you gave for gl.h, which also worked for glu.h by the 
>way.  Thanks,
>
>Shawn
>
>PLEASE CC TO CaetSith7@aol.com I AM NOT A MEMBER OF THE LIST.

If you have the latest gcc for Cygwin, that is 2.95.2-7 (you can check with 
gcc -v), and you compile programs using glut with -mno-cygwin, you must 
also use -mwin32.

BTW, your linking order is incorrect. From /usr/doc/opengl-1.1.0/README.txt:

         Linking of code calling OpenGL, GLU, GLUT
         -----------------------------------------

         Add -lglut32 -lglu32 -lopengl32 to your link command.

Always link with the highest-level librairies first, the more basic ones last.

Instructions for compiling glut/glu/openGL programs with -mno-cygwin will 
be added in the README file of the next release of the package.



André Bleau, ing., associé de recherche
bleau@igb.umontreal.ca

Laboratoire de recherche en Imagerie et en Orthopédie
École de Technologie Supérieure


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

