Hello, I am kind of new to all of this, trying to compile a very simple openGL program from a tutorial book. I know this thread was already started, but the solutions already offered didn’t work for me.
Here is what I have:
mandrake 8.1 GeForce2Go
gcc or g++ or c++ foo.c -lGL -lGLU -lglut
produces aproximately (bare with me, I had to copy this by hand as my unix is on the other partition and is not on a network at this time)
I wrote down the errors I am getting, here is what I have:
gcc foo.c -lGL -lGLU -lglut produces aproximatley
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/…/…/…/libglut.so: undefined refrerence to the following
If you knew that this question has been answered before could you have done a search for the answer.GLUT from Mesa lets you use your command line but the original GLUT requires additional libraries like -lX11. Check the makefiles or do a search.
You know, when I installed Mesa, it didn’t even install glut. I tried both the command line options -with and without-glut, but neither produced the files, so I installed from the glut source at opengl.org.
I have been doing a little research, and it seems like this problem is due to certain SGI features not supported in NVidias version of glx? Is this the case? If so, what do I do about it?
You can use the original glut but additional libraries has to be linked. I think that Mesa glut does not need that because of the .la file. It is a textfile so you can examine it.
Newer Mesa is perhaps using glx extensions that nvidia does not support but it works with Mesa 3.4.2. About your update:
1 is not needed
try 3.4.2 instead of 4.0 in 2 if you want to use glut from Mesa
3 should be avoided since 4 is replacing not needed libraries.
I suggest the following:
download Mesa 3.4.2 from the Mesa site
unpack and do ./configure
cd src-glut
make
make install (as superuser)
check that you do not have conflicting libaries in /usr/lib and /usr/local/lib
Yes, jackz suggestion is perhaps easier but maybe will the OpenGL libraries be owerwritten. If you could not use glut before did you not install the Mesa.-dev package.