Advertisement

glut.h library and linux

Started by March 04, 2002 12:41 PM
6 comments, last by ttctnh 22 years, 10 months ago
Can anyone tell me how to install the glut.h stuff on a linux machine? I have downloaded the glut-3.7 source distribution from the opengl.org website. I tried to figure it out, but the README files were so vague to me since I am a beginner to linux(although I know all basic commands, so I dont need any explanation on what they do). I did not know if I did it right. Also, when I tried, it did not put any of the files into the directories they are supposed to be. Which is why I think I did it wrong. I am running Linux Mandrake 8.1
I did it once and I''ve forgotten. Sorry. Hopefully someone else will help you out.

On the other hand, I despise GLUT and refuse to run any demos that require it. But that''s just me...

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Advertisement
I think you have to build the stuff... Just guessing, though...

In other words:

./configure
make
make install

rm -rf /bin/laden
Hmm...it is a bit confusing. Here''s a copy of the readme for a linux install. It looks like it just keeps the libraries in the install directory; maybe it should be put in /usr/local/lib or something.


Files For Making a Mesa/GLUT System For Linux ELF

Version 0.0.6

Peter F. Martone
updated by Mark Kilgard (for GLUT 3.7)

//************************************************************

There are three files included in this archive:

Glut.cf -- file required by imake-- use this to replace the
stock version that came with GLUT.

Makefile -- Makefile required to build ELF library, belongs in
the $GLUT_HOME/lib/glut/. directory.

path -- the line required for ld.so to find the libraries at
run-time. Add this to your .profile file.

//************************************************************
The steps to make this work are:

1) Change into $GLUT_HOME/. and make a backup copy of the
Glut.cf file. Then, take the copy from this archive and move it
into $GLUT_HOME.

2) Run the script to build all the makefiles:

./mkmkfiles.imake

3) Change into $GLUT_HOME/lib/glut/. and make a backup copy of
the Makefile. Now, take the Makefile out of the archive and
replace the old one.

4) WHILE STILL IN THE $GLUT_HOME/lib/glut/. DIRECTOR, RUN:

make

This should build the shared library ''libglut.so.3.7''.

IF YOU HAVE PROBLEMS WITH HEADER FILE DEPENDENCIES, try
doing:
make depend
make

This should rebuild the Makefile dependencies.

If this does not work, remove all the lines in "Makefile" below
the line saying "DO NOT DELETE" (yes, disregard what the line
says). Then try "make depend; make"

5) Make two symbolic links:

ln -s libglut.so.3.7 libglut.so.3
ln -s libglut.so.3.7 libglut.so

6) Now, back up to $GLUT_HOME/. and:

make

This will make all the example programs.

7) Add the line from archive file ''path'' to your .profile, or
better to your systemwide (/etc/profile). Then logout out and
back in again (to refre After this, your system should be working fine. If you are
having any problems with these files, or you have any comments,
please contact me at pmarton@bgnet.bgsu.edu. I''ve only tried
this on a Slackware 3.0 (heavily modified) Linux PC, so
different distributions may behave differently.

Good luck, and thank you Brian Paul, Mark Kilgard,
Linus Torvalds and everybody else that fits for giving college
students on a budget a decent learning enviornment.
sh your path.)


Oh shit! You just brought back the painful memories of getting that convoluted piece of garbage to work. It was things like this that lead me to believe the Open Source Revolution was over-hyped; couldn''t the fool just write a makefile that built all the lesser targets, so you''d simply type make install and cheerfully whistle while it went about it''s business?

Anyway...
Note: $GLUT_HOME for me was /usr/local/src/glut. Replace as appropriate. Also note that I unpacked the tarball to a separate directory.
$ tar -xvf <tarball> /usr/local/src/glut_tar$ mv /usr/local/src/glut/Glut.cf /usr/local/src/glut/backup_Glut.cf$ cp /usr/local/src/glut_tar/Glut.cf /usr/local/src/glut/.$ cd /usr/local/src/glut$ ./mkmkfiles.imake$ cp /usr/local/src/glut/lib/glut$ mv Makefile Makefile.backup$ make depend$ make$ ln -s libglut.so.3.7 libglut.so.3$ ln -s libglut.so.3 libglut.so$ cd /usr/local/src/glut                            (or cd -)$ make 

Follow step 7. Enjoy.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
For step 7, what do I replace $GLUT_HOME and $GLUT_SRC with in the line of code that I am supposed to add to the profile directory?
Advertisement
I''m sorry, but I don''t get it. Why do you go through all that glut.h installation stuff when most of the ( good ) Linux distros come with the Mesa-devel RPM that includes glut.h
Why not just download that RPM from mesa3d.org and install it ?
Did I missed something ?


I did install the Mesa stuff. The newest version from Mesa3d and it did not install the glut libraries. Unless I missed them, but all the other OpenGL libraries installed fine and are working.

This topic is closed to new replies.

Advertisement