PDA

View Full Version : rh9.0 glut trouble



03-13-2004, 07:41 PM
hi everyone
i'm not an expert using linux and i'm having frustrating problems with getting glut to work on redhat 9.0 (shrike).

i've looked up every possible forum on the internet about it but unsuccessful.

Firstly, i tried compiling glut using mesa6.0. After extracting the files i followed the instruction they gave me.
1) ./configure did not work as there is no such file.
2) after typing make a whole list was generated with OS types. I did not find anything particular to what i was using so i typed 'make Linux' and off it went. however during it compliation there were countless errors (including parse errors). And yes i was logged in as root.

Secondly i found forums telling me to erase the new rpm's and compile the older ones made for rh8.0...glut-3.7-8.i386...and glut-devel-3.7-8.i386 which i got from ftp.redhat.com
i erased the old one and installed these as instructed, however i still can make any C programs to use glut.h

i made an empty C program which included glut.h to see if the library at least worked but it says it couldn't find glut.h
i typed it like this -
#include <glut.h>

glut.h exists in /usr/include/GL/...along with fglu.h and fgl.h
so i tried directly including glut.h from the directory but now it says -
/usr/include/GL/glut.h:58:19 GL/gl.h No such file
and similarly for glu.h
i don't even have gl.h/glu.h...only ones preceded with 'f'.

i've tried countless variations of compiling the file...
gcc -o temp temp.c -lGLU etc etc etc

but nothing seems to work!

pls help me!

03-13-2004, 07:49 PM
actually, trying to install glut-devel-3.7.8etc give me an error:

error: Failed dependencies:
/usr/lib/libGL.so is needed by glut-devel-3.7-8

checking the directory the closest thing i have to that is libGL.so.1

jide
03-14-2004, 07:44 AM
haven't you got any rpm for glut on your distribution ? You could surely find them on the Internet.

03-14-2004, 07:33 PM
i have numerous...mesa...glutx.x....freeglut
however installing them only gives me glut.h

where do i get gl.h and glu.h (and their libraries) from??

Deiussum
03-15-2004, 05:26 AM
You should include the GL files like so

#include <GL/glut.h>

Not like

#include <glut.h>

Often times the gl.h and glu.h headers are actually in a directory like /usr/X11R6/include/GL, and if they are, you need to include that in your search path by using -I/usr/X11R6/include/. Likewise, you will likely need to include the library path with -L/usr/X11R6/lib, and of course, use the libraries with -lGL -lGLU -lglut...

jide
03-15-2004, 06:37 AM
Originally posted by rlay:
i have numerous...mesa...glutx.x....freeglut
however installing them only gives me glut.h

where do i get gl.h and glu.h (and their libraries) from??

Only install Mesa that provides all of them: gl, glu, glut and even other. If Mesa really does not more provide glut (which I don't believe), prefer freeglut.

so, install all the Mesa*.rpm packages and Mesa*-devel.rpm, that would be suffisant for your start.

03-15-2004, 06:49 AM
Well when u build OpenGl / Glut from source, U have to make sure that X Software Development package is installed bcoz it contains some packages needed. You can add it from System Setting -> Add/remove program. Remember to install development tools as well.

Cheers,

Elnoxvie

03-15-2004, 02:46 PM
thanks guys!

elno was right...mesa wasn't compiling because I was missing Xlib.h and Xutil.h

I hope i don't need anything else...

thanks again