delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/03/10:57:20

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <COL104-W694A5343BB4F57F05BFD57931D0@phx.gbl>
Reply-To: <cygwin AT cygwin DOT com>
From: =?iso-8859-1?Q?Andr=E9_Bleau?= <andre_bleau AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Re: Trouble Compiling Cygwin GLUT Examples
Date: Mon, 3 Nov 2008 10:56:24 -0500
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id mA3FvIJ4012111

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019