can't find glut.h?

using fedora core 1

glut 3.7-8 installed

trying to compile some trival opengl code

the only include is glut.h

gcc -o test simple.c -L/usr/include/GL lglut

when I run this I get a “glut.h:no such file or directory”

thanks from a noob

Maybe glut.h is not in standard include directory, usually …/include/GL (you should include it like this #include <GL/glut.h>). Try searching file system for it, and if it finds it in other dir than include/GL just use -I command line option for gcc.
Hope this helps.

I don’t do much in the way of command line stuff, I use Kdevelope under fedora, it takes care of all that stuff.

But I think you have your command line set wrong.

Should it not be more like this"
gcc -o test simple.c -I/usr/lib/include -L/usr/lib -lglut

-L = Library directory
-l = library file to use

-I = Include directory

Originally posted by not_yet:
[b]using fedora core 1

glut 3.7-8 installed

trying to compile some trival opengl code

the only include is glut.h

gcc -o test simple.c -L/usr/include/GL lglut

when I run this I get a “glut.h:no such file or directory”

thanks from a noob[/b]

thanks

this is off topic

but, having never used kdevelope,

where in kdevelope do you set it to point to the library / include files needed to compile opengl

cheers

Kdevelope set’s all the library/include directorys for you, you just tell it what librarys to include in your project.

If you are using glut, just create a C/C++ project. Then under project options, linker settings add: -lGL -lGLU -lglut

Originally posted by not_yet:
[b]thanks

this is off topic

but, having never used kdevelope,

where in kdevelope do you set it to point to the library / include files needed to compile opengl

cheers[/b]

Hi,

Just got glut-3.7-8 to install over the buggy 3.7-12.

My glut examples compiled fine, under kdevelope.

Here is what I have done:

Installed Fedora.
Installed the runtime and development files, glut-3.7-8.rpm and glut-devel-3.7-8.rpm. Note I rebuilt the glut-3.7-8 from the src rpm.
if you had the newer glut build files installed, you can over write them with rpm --install --oldpackage --force glut-3.7-8.rpm

I did not have to install any onther openGL librarys, or support files other then glut.

Also have setup SDL on fedora and had succesful compiles.

Originally posted by not_yet:
[b]thanks

this is off topic

but, having never used kdevelope,

where in kdevelope do you set it to point to the library / include files needed to compile opengl

cheers[/b]

thanks nexusone :slight_smile:

not_yet