Errors compiling OpenGL application
Andre Bleau
bleau@igb.umontreal.ca
Wed May 23 06:37:00 GMT 2001
"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
More information about the Cygwin
mailing list