I would like to know how do I compile programs with (#include <GL/glut.h> ), i receive an error answer like cannot find glut.h , so i’m asking to someone help me with this (when i installed redhat 7.3 I select to install glut package)? I compiled with gcc (gcc -o outputfile Bounce.c)
Check the include directory, see if it is in the “include” or in “include\GL” directory.
#include<glut.h> try this:
Originally posted by nspm:
[b]Hi,
I would like to know how do I compile programs with (#include <GL/glut.h> ), i receive an error answer like cannot find glut.h , so i’m asking to someone help me with this (when i installed redhat 7.3 I select to install glut package)? I compiled with gcc (gcc -o outputfile Bounce.c)
hi thanks for your reply now i receive an error message like this “/tmp/cc0whPY9.o(.text+0x301): undefined reference to `glutMainLoop’” and others like that .
To explicitly tell gcc/g++ where to find your GL libs:
-L/usr/X11R6/lib
To explicitly tell gcc/g++ where to find your GL headers:
-I/usr/X11R6/include/GL
Note though that gcc may automatically look in those locations for libraries and headers, and also note that, depending on your linux distibution, there may be symbolic links in /usr/include and /usr/lib to the relevant files in /usr/X11R6.
Thanks for the correction johane.
[This message has been edited by jmg (edited 10-12-2002).]
> I have instead of libGLUT.so it’s libglut.so (lowercase)… any probs there?
No, libglut.so is correct.
Btw, the errors you’re seeing are linker errors, not compiler errors (since, as you can see, ccncR0l9.o has evidently already been built. The linker simply can’t resolve references to the functions in libGL.so).