PDA

View Full Version : can't find glut.h?



not_yet
03-25-2004, 11:59 AM
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

mproso
03-25-2004, 12:31 PM
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.

nexusone
03-25-2004, 05:48 PM
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:
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

not_yet
03-25-2004, 06:06 PM
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

nexusone
03-26-2004, 10:13 AM
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:
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

nexusone
03-28-2004, 08:23 AM
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:
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

not_yet
03-28-2004, 08:50 PM
thanks nexusone :)

not_yet