What libraries do I need to link up with to use GLUT on linux? I'm linking with glut, gl, and glu and it still says I'm missing a few functions. They all start with X and have something to do with extensions.
What libraries do I need to link up with to use GLUT on linux? I'm linking with glut, gl, and glu and it still says I'm missing a few functions. They all start with X and have something to do with extensions.
try this:
-lglut -lGL -lGLU -lX11 -lXmu -lm
dont forget to specify the lib paths:
-L/usr/local/lib
and the include paths:
-I/usr/local/include
It still gives me the same errors.
Here's some of them:
Here's what I used to compile:Code:/usr/lib/libglut.so: undefined reference to 'XGetExtensionVersion' /usr/lib/libglut.so: undefined reference to 'XFreeDeviceList' /usr/lib/libglut.so: undefined reference to 'XListInputDevices' /usr/lib/libglut.so: undefined reference to 'XFreeDeviceState' /usr/lib/libglut.so: undefined reference to 'XOpenDevice' /usr/lib/libglut.so: undefined reference to 'XSelectExtensionState'
Code:g++ -g -o gluttest main.o -L/usr/lib -L/usr/local/lib -lglut -lGL -L/usr/X11R6/lib -lXext -ldl -lGLU -lX11 -lXmu -lm
Add -lXi and see what happens.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
Thanks, man. It fixed all the errors.