NVidia GLU glut GL simple program problems

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

…:glxBindChannelToWindowSGIX
…: glxCreateContextWithConfigSGIX
…: glxgetFBConfigAttribSGIX
…: XGetExtensionVersiopn
…: XFreeDeviceList
…: XQueryDeviceState
…: XListInputXDevices
…: XListInputDevices
…: glxQueryChannelDeltaSSGIX
…: glxChannelRectSGIX
…: glxChannelRectSyncSGIX
…: XFreeDeviceState
…: XOpenDevice
…: glxQueryChannelRectSGIX
…: glxGetFBConfigFromVisualSGIX
…: XMULookupStandardColorMap
…: XSelectExtensionEvent
collect 2: ld returned 1 exit status

Any help would be apreciated. I have been trying to get this going for a while now.

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?

Sam

an update

  1. Reinstalled Mandrake 8.1
  2. Installed Mesa 4.0 + Demos (GLUT)
  3. Deleted libGL*
  4. Installed NVidia Drivers
    now gcc foo.c -lGL -lGLU -lglut produces
    /usr/lib/libglut.so: undefined reference to glXBindChannelToWindowSGIX' /usr/lib/libglut.so: undefined reference toglXCreateContextWithConfigSGIX’
    /usr/lib/libglut.so: undefined reference to glXGetFBConfigAttribSGIX' /usr/lib/libglut.so: undefined reference toglXQueryChannelDeltasSGIX’
    /usr/lib/libglut.so: undefined reference to glXChannelRectSyncSGIX' /usr/lib/libglut.so: undefined reference toglXChannelRectSGIX’
    /usr/lib/libglut.so: undefined reference to glXQueryChannelRectSGIX' /usr/lib/libglut.so: undefined reference toglXGetFBConfigFromVisualSGIX’

Originally posted by shalperi:
[b]an update

  1. Reinstalled Mandrake 8.1
  2. Installed Mesa 4.0 + Demos (GLUT)
  3. Deleted libGL*
  4. Installed NVidia Drivers
    now gcc foo.c -lGL -lGLU -lglut produces
    /usr/lib/libglut.so: undefined reference to glXBindChannelToWindowSGIX' /usr/lib/libglut.so: undefined reference toglXCreateContextWithConfigSGIX’
    /usr/lib/libglut.so: undefined reference to glXGetFBConfigAttribSGIX' /usr/lib/libglut.so: undefined reference toglXQueryChannelDeltasSGIX’
    /usr/lib/libglut.so: undefined reference to glXChannelRectSyncSGIX' /usr/lib/libglut.so: undefined reference toglXChannelRectSGIX’
    /usr/lib/libglut.so: undefined reference to glXQueryChannelRectSGIX' /usr/lib/libglut.so: undefined reference toglXGetFBConfigFromVisualSGIX’ [/b]

I am not sure if the problems are in nvidia GL or mesa but there are problems with
those SGI extensions.

If you really do not need them , you write you try to do simple programs, do not use
mesa-4.

Use nvidia drivers with glu and glut that you have in mandrake disks. It should work.

;jackz

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

Hope this helps.

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.

Ok,

I am going to try Mesa 3.42.
Hope this works.

Sam

Yup, Mesa 3.4.2 worked like a charm.
Thanks.

SH

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.