public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: OpenGL, -mno-cygwin AND GLUT
@ 2001-02-16 13:38 Andre Bleau
  2001-02-16 14:32 ` Earnie Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Andre Bleau @ 2001-02-16 13:38 UTC (permalink / raw)
  To: cygwin; +Cc: CaetSith7

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

>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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenGL, -mno-cygwin AND GLUT
  2001-02-16 13:38 OpenGL, -mno-cygwin AND GLUT Andre Bleau
@ 2001-02-16 14:32 ` Earnie Boyd
  2001-02-16 17:55   ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Earnie Boyd @ 2001-02-16 14:32 UTC (permalink / raw)
  To: Andre Bleau; +Cc: cygwin, CaetSith7

Andre Bleau wrote:
> 
> 
> 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.
> 

If that is true then it would be a package bug.  Hmm... after reviewing
the specs file I can see that indeed the /usr/include/w32api directory
will not get searched even for -mno-cygwin when it should.  The
workaround is as you state.

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenGL, -mno-cygwin AND GLUT
  2001-02-16 14:32 ` Earnie Boyd
@ 2001-02-16 17:55   ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2001-02-16 17:55 UTC (permalink / raw)
  To: cygwin

On Fri, Feb 16, 2001 at 05:32:47PM -0500, Earnie Boyd wrote:
>Andre Bleau wrote:
>> 
>> 
>> 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.
>> 
>
>If that is true then it would be a package bug.  Hmm... after reviewing
>the specs file I can see that indeed the /usr/include/w32api directory
>will not get searched even for -mno-cygwin when it should.  The
>workaround is as you state.

Yep.  I've had this fixed in my sources for a while.  This is one reason
why I haven't made -7 the official version.

cgf

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenGL, -mno-cygwin AND GLUT
@ 2001-02-16 16:45 CaetSith7
  0 siblings, 0 replies; 5+ messages in thread
From: CaetSith7 @ 2001-02-16 16:45 UTC (permalink / raw)
  To: cygwin

>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.

I have updated to the newest Cygwin, and have used the command line changes you specify, but the errors remain...

Shawn

Please CC responses to CaetSith7@aol

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* OpenGL, -mno-cygwin AND GLUT
@ 2001-02-16 12:35 CaetSith7
  0 siblings, 0 replies; 5+ messages in thread
From: CaetSith7 @ 2001-02-16 12:35 UTC (permalink / raw)
  To: cygwin

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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-02-16 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-16 13:38 OpenGL, -mno-cygwin AND GLUT Andre Bleau
2001-02-16 14:32 ` Earnie Boyd
2001-02-16 17:55   ` Christopher Faylor
  -- strict thread matches above, loose matches on Subject: below --
2001-02-16 16:45 CaetSith7
2001-02-16 12:35 CaetSith7

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).