View Full Version : compiling opengl and glut
fran24
04-22-2003, 03:40 AM
im trying tocompile opengl and glut under linux, but i can't
gcc -L/usr/lib -I/usr/include -lGLU -lglut prueba.c -o prueba.o
what is the right way to do so?
thanks!!
nexusone
04-22-2003, 06:15 AM
You for got to include the most important library of all.... the openGL library! the other two are helper library's.
link the following:
-lGL -lGLU -lglut
I have a couple of glut examples for linux posted on my website:
www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)
Originally posted by fran24:
im trying tocompile opengl and glut under linux, but i can't
gcc -L/usr/lib -I/usr/include -lGLU -lglut prueba.c -o prueba.o
what is the right way to do so?
thanks!!
fran24
04-22-2003, 06:33 AM
gcc -L/usr/lib -I/usr/include -lGL -lGLU -lglut prueba.c -o prueba.o
ERROR:
/usr/lib/libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
/usr/lib/libglut.so: undefined reference to `glXCreateContextWithConfigSGIX'
/usr/lib/libglut.so: undefined reference to `glXGetFBConfigAttribSGIX'
/usr/lib/libglut.so: undefined reference to `XGetExtensionVersion'
/usr/lib/libglut.so: undefined reference to `XFreeDeviceList'
/usr/lib/libglut.so: undefined reference to `XQueryDeviceState'
/usr/lib/libglut.so: undefined reference to `XListInputDevices'
/usr/lib/libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
/usr/lib/libglut.so: undefined reference to `glXChannelRectSyncSGIX'
/usr/lib/libglut.so: undefined reference to `glXChannelRectSGIX'
/usr/lib/libglut.so: undefined reference to `XFreeDeviceState'
/usr/lib/libglut.so: undefined reference to `XOpenDevice'
/usr/lib/libglut.so: undefined reference to `glXQueryChannelRectSGIX'
/usr/lib/libglut.so: undefined reference to `glXGetFBConfigFromVisualSGIX'
/usr/lib/libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/lib/libglut.so: undefined reference to `XSelectExtensionEvent'
it doesn't find glx library, any idea?
thanks!!!
satan
04-22-2003, 07:31 AM
Originally posted by fran24:
it doesn't find glx library, any idea?
thanks!!!
1. Idea: stop cross posting, once is enough
2. Idea: it DOES find glx, i am very sure
3. Idea: read other threads in this forum and you will find the solution to your problem
4. Idea: try the search function of this forum before posting a new thread
hope this helps
pkaler
04-22-2003, 07:39 AM
I think I've answered this question about 10 times in the last month. Look through the archives.
scriptlord
04-22-2003, 07:43 AM
I compile all of my glut programs like this
g++ something.c -o something -lGL -lGLU -lglut -lm
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.