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!!
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!!
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/
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!!
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!!!
1. Idea: stop cross posting, once is enoughOriginally posted by fran24:
it doesn't find glx library, any idea?
thanks!!!
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
I think I've answered this question about 10 times in the last month. Look through the archives.
I compile all of my glut programs like this
g++ something.c -o something -lGL -lGLU -lglut -lm