Porting over existing program

We have some code written for a RedHat 64 bit machine with Nvidia which utilses opengl for its visualization routines. In fact it uses some of the ArcBall routine from NeHe tutorial site.

The code has been ported to a dell laptop running ubuntu 9.04. The trouble is now how to compile the code or rather get the correct libraries installed. The files make reference to the following header files:

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>

and the Makefile looks like this:

CXX=g++
CXXFLAGS=
OBJS=Main.o Viewer.o ArcBall.o
LIBS=-L/usr/X11R6/lib64 -lGLU -lGL -lgd -lXxf86vm -lpthread

all: SS

SS: $(OBJS)
$(CXX) $(OBJS) -o $@ $(LIBS)

==============================================================

In a nutshell, how best to find the right versions of openGL. I appreciate that there are different versions and have used synaptic to demo a few of them, however am suffering from the compilation error:

Main.cpp:5:20: error: GL/glu.h: No such file or directory

Therefore is there a checklist of what should be installed to get this code running or at least the libraries installed?

Thanks in advance.

should be enough :
sudo apt-get install libglu1-mesa-dev

Thanks. Code now compiles, but having issues with the following at run-time.

Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Single Buffered visual
Xlib: extension “GLX” missing on display “:0.0”.
glx-version -1211478028.-1212655557
Segmentation fault

Any ideas what could be causing this?

Thanks

Sanity check : run glxgears from command line. If it does not work, you will have to fix your GL/Xorg setup. You can try searching/asking the ubuntu forums.

Can you post the output of glxinfo ?

got this on glxinfo:

glxinfo
name of display: :0.0
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Error: couldn’t find RGB GLX visual or fbconfig

Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.

Have no idea what could be the matter. Have re-installed libglu1-mesa-dev

gears does not run…

Got this working by upgrading to ubuntu 9.100. Looks it was something to to with the X11 - but after re-installing these there was no joy - so decided to upgrade to 9.100 and this seems to have solved the problem.