public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Trouble Compiling Cygwin GLUT Examples
@ 2008-11-03  0:01 John M Fernandes-Salling
  0 siblings, 0 replies; 3+ messages in thread
From: John M Fernandes-Salling @ 2008-11-03  0:01 UTC (permalink / raw)
  To: cygwin

Hello,

I'm running Cygwin on a Windows Vista computer, and I'm having trouble compiling the example GLUT c file "helloGlut.c" provided in the Cygwin OpenGL package.

Using Cygwin, after navigating to the directory  "/cygdrive/c/cygwin/usr/share/doc/opengl-1.1.0/GLUTExamples/Cygwin", I type "make helloGlut" without quotes, and the output is:
"cc -c -O2 helloGlut.c
cc -O2  helloGlut.o -lglut32 -lglu32 -lopengl32   -o helloGlut
helloGlut.o:helloGlut.c:(.text+0x86): undefined reference to '_glutInit'
helloGlut.o:helloGlut.c:(.text+0x92): undefined reference to '_glutCreateWindow'

helloGlut.o:helloGlut.c:(.text+0x9e): undefined reference to '_glutDisplayFunc'
helloGlut.o:helloGlut.c:(.text+0xaa): undefined reference to '_glutKeyboardFunc'

helloGlut.o:helloGlut.c:(.text+0xbb): undefined reference to '_glutMainLoop'
collect2: ld returned 1 exit status
make: *** [helloGlut] Error 1" without quotes.

As far as I can tell, I've followed the instructions for setting up OpenGL, GLU, and GLUT within Cygwin, so I'm at a loss as to what the problem is.  I'm new both to programming in C, OpenGL, and using Cygwin, having formerly programmed in Java with the JOGL binding for OpenGL.  Any help would be greatly appreciated.

Thank you for your time,
John Fernandes-Salling

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

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

* Re: Trouble Compiling Cygwin GLUT Examples
@ 2008-11-04 15:46 André Bleau
  0 siblings, 0 replies; 3+ messages in thread
From: André Bleau @ 2008-11-04 15:46 UTC (permalink / raw)
  To: cygwin


John M Fernandes-Salling  wrote:
> 
> Hello,
> 
> I'm running Cygwin on a Windows Vista computer, and I'm having trouble compiling the 
> example GLUT c file "helloGlut.c" provided in the Cygwin OpenGL package.
> 
> Using Cygwin, after navigating to the directory 
>  "/cygdrive/c/cygwin/usr/share/doc/opengl-1.1.0/GLUTExamples/Cygwin", I type 
> "make helloGlut" without quotes, and the output is:
> "cc -c -O2 helloGlut.c
> cc -O2  helloGlut.o -lglut32 -lglu32 -lopengl32   -o helloGlut
> helloGlut.o:helloGlut.c:(.text+0x86): undefined reference to '_glutInit'
> helloGlut.o:helloGlut.c:(.text+0x92): undefined reference to '_glutCreateWindow'
> 
> helloGlut.o:helloGlut.c:(.text+0x9e): undefined reference to '_glutDisplayFunc'
> helloGlut.o:helloGlut.c:(.text+0xaa): undefined reference to '_glutKeyboardFunc'
> 
> helloGlut.o:helloGlut.c:(.text+0xbb): undefined reference to '_glutMainLoop'
> collect2: ld returned 1 exit status
> make: *** [helloGlut] Error 1" without quotes.
> 
> As far as I can tell, I've followed the instructions for setting up OpenGL, GLU, and GLUT 
> within Cygwin, so I'm at a loss as to what the problem is.  I'm new both to programming in> C, OpenGL, and using Cygwin, having formerly programmed in Java with the JOGL binding 
> for OpenGL.  Any help would be greatly appreciated.
> 
> Thank you for your time,
> John Fernandes-Salling
> 

I just discovered that the last version of the libglut-devel package now installs a glut.h file in /usr/include/GL. This file takes precedance over the one in /usr/include/w32api/GL and declares the same functions but with a different calling convention. This makes the packages libglut-devel and opengl incompatible; you will have to uninstall one of them if you have both. libglut-devel is for applications that will run through and X server while opengl is for application that will use the natve Windows interface. The first is Linux compatible at the source level while the second is not, but is much faster.

I will have to discuss the issue with the libglut-devel maintainer on the cygwin-apps list.

Regards,

- André Bleau, Cygwin's volunteer OpenGL package maintainer.

Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com



_________________________________________________________________


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

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

* Re: Trouble Compiling Cygwin GLUT Examples
@ 2008-11-03 15:57 André Bleau
  0 siblings, 0 replies; 3+ messages in thread
From: André Bleau @ 2008-11-03 15:57 UTC (permalink / raw)
  To: cygwin


John M Fernandes-Salling  wrote:
> 
> Hello,
> 
> I'm running Cygwin on a Windows Vista computer, and I'm having trouble compiling the 
> example GLUT c file "helloGlut.c" provided in the Cygwin OpenGL package.
> 
> Using Cygwin, after navigating to the directory 
>  "/cygdrive/c/cygwin/usr/share/doc/opengl-1.1.0/GLUTExamples/Cygwin", I type 
> "make helloGlut" without quotes, and the output is:
> "cc -c -O2 helloGlut.c
> cc -O2  helloGlut.o -lglut32 -lglu32 -lopengl32   -o helloGlut
> helloGlut.o:helloGlut.c:(.text+0x86): undefined reference to '_glutInit'
> helloGlut.o:helloGlut.c:(.text+0x92): undefined reference to '_glutCreateWindow'
> 
> helloGlut.o:helloGlut.c:(.text+0x9e): undefined reference to '_glutDisplayFunc'
> helloGlut.o:helloGlut.c:(.text+0xaa): undefined reference to '_glutKeyboardFunc'
> 
> helloGlut.o:helloGlut.c:(.text+0xbb): undefined reference to '_glutMainLoop'
> collect2: ld returned 1 exit status
> make: *** [helloGlut] Error 1" without quotes.
> 
> As far as I can tell, I've followed the instructions for setting up OpenGL, GLU, and GLUT 
> within Cygwin, so I'm at a loss as to what the problem is.  I'm new both to programming in> C, OpenGL, and using Cygwin, having formerly programmed in Java with the JOGL binding 
> for OpenGL.  Any help would be greatly appreciated.
> 
> Thank you for your time,
> John Fernandes-Salling
> 

The undefined references are supposed to be satisfied by /usr/lib/w32api/libglut32.a
Do you have that file? If not, install the w32api package, as stated in 
/usr/share/doc/opengl-1.1.0/README.txt

Regards,

- André Bleau, Cygwin's volunteer OpenGL package maintainer.

Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com

_________________________________________________________________


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

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

end of thread, other threads:[~2008-11-04 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-03  0:01 Trouble Compiling Cygwin GLUT Examples John M Fernandes-Salling
2008-11-03 15:57 André Bleau
2008-11-04 15:46 André Bleau

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