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:
[b]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!![/b]
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!!!
Originally posted by fran24:
it doesn’t find glx library, any idea?
thanks!!!
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
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.