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.20010523092329.00b1eb30@irispavp.igb.umontreal.ca>
X-Sender: bleau2@irispavp.igb.umontreal.ca
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Wed, 23 May 2001 09:37:51 -0400
To: cygwin@cygwin.com
From: Andre Bleau <bleau@igb.umontreal.ca>
Subject: Re: Errors compiling OpenGL application
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
X-MDRemoteIP: 10.52.48.85
X-Return-Path: bleau@igb.umontreal.ca
X-MDaemon-Deliver-To: cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id JAA31439

"Claude Eckel" <pinky dot gahr at web dot de>  wrote:

>I compiled a library called 'PLIB' using cygwin. Everything worked fine.
>Then I tried to compile a game using this lib and I got about 6 sides of
>errors like this:
>undefined reference to 'glVertexi@8'
>undefined reference to 'glBegin@4'
>undefined reference to 'glEnd@0'
>
>If you want to see the command I used:
>
>c++
>MIP1.00.cpp -o./MIP.exe -I/usr/include/plib/ -lglut32 -lopengl32 -lGLU32 -lp
>libssg -lplibsg -lplibpu -lplibfnt -lplibul
>
>What should I do / include?

The order of libraries is important. I don't know anything about PLIB, but 
Glut, Glu and OpenGL don't call these libraries, so I would put PLIB 
librairies before them. Also, Glu calls OpenGL so -lglu32 has to be before 
-lopengl32. I would modify your compilation command as follow:

g++ MIP1.00.cpp -o MIP.exe -I/usr/include/plib/ -lplibssg -lplibsg \
  -lplibpu -lplibfnt -lplibul -lglut32 -lglu32 -lopengl32

You should read the REAME.txt file in /usr/doc/opengl-1.1.0 .



André Bleau, Cygwin's OpenGL package maintainer.

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

