Nvidia and glut

Hi,
I’ve just installed the NVidia Drivers for my Toshiba laptop (RedHat 9) with Gforce 420 Go graphics chip. After getting the display right, I’ve just downloaded the latest glut package. This seems to make OK.

However, when trying to compile demo programs (e.g., gcc cube.c -o cube -lglut -lGL -lGLU) i run into problems.

The error message I recieve says that it fails to find glut.h.

I have glut.h in my $GLUT_HOME/lib/glut directory. Do I need to move it to another directory, or set up dynamic links, or am I doing something else wrong?

has anyone else come up against this problem?

thanks,
Simon

gcc cube.c -o cube -L/path/to/lib/glut -lglut -lGL -lGLU

glut.h should be placed with other openGL headers, just so you don’t have to change every piece of glut code you get.
The other option is to tell the compiler where to find it, in the command line options.

Standard directory placement:
user/include/GL/
gl.h
glu.h
glut.h

user/lib
libGL.a
libGLU.a
libglut.a

Originally posted by shosking:
[b]Hi,
I’ve just installed the NVidia Drivers for my Toshiba laptop (RedHat 9) with Gforce 420 Go graphics chip. After getting the display right, I’ve just downloaded the latest glut package. This seems to make OK.

However, when trying to compile demo programs (e.g., gcc cube.c -o cube -lglut -lGL -lGLU) i run into problems.

The error message I recieve says that it fails to find glut.h.

I have glut.h in my $GLUT_HOME/lib/glut directory. Do I need to move it to another directory, or set up dynamic links, or am I doing something else wrong?

has anyone else come up against this problem?

thanks,
Simon[/b]

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