PIGE
    Home
    .plan
    FAQ
    .log
Compiling
    Linux/UNIX
    Mac OS 8 & 9
    Mac OS X
    Windows
Downloads
    Source Code
    Executable Demos
    Thesis
Screenshots
    Crate
    Room
Tutorials
    Collision Detection
    Creating Icons
    OpenAL
    A*
Resources
    OpenGL
    OpenAL
    Game Dev
    Books
Compiling: Linux
Here are the instructions in downloading and getting Mesa to work.

1. Go to www.mesa3d.org. Click on the download link.

2. Click on one of the compressed files (tar, zip or bzip2) to download the files. You can also download the demos to test what can be done.

3. Now, decompress the files. If you downloaded the .zip files, use the command gzip -d or gunzip. Look up the man page for gzip for more information by typing at a command prompt: man gzip

Unfortunately I came in problems trying to use gzip or gunzip, and the error gzip: MesaDemos-3.2.zip: unknown suffix -- ignored occurred.

If you downloaded the .tar.gz files, use this command to uncompress the files.

tar -xvzf name_of_file

In this case, I downloaded the Mesa-3.2 files (version numbers might be different), so I used the command tar -xvzf MesaLib-3.2.tar.gz

4. You might want to also download the demos. Decompress them the same way you decompressed the Mesa libraries. They will be placed under the new Mesa directory under the 'demos' directory.

5. Downloading the GL & Glut libraries.
If you don't have the Glut library, you will need to download and install it to get it to run. To check whether or not you have the appropriate directory or not, type: cd /usr/include/GL
If this resulted in an error, then you don't have the appropriate directory and files.

Go to http://reality.sgi.com/mjk_asd/glut3/glut3.html and download the latest GLUT libraries for your system. Since you are probably using Linux, download the Unix tar format, and uncompress like the Mesa libraries.

For those who are using a C-shell, add this line to your .cshrc file in your main directory.

setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/home/admin/Mesa-3.0/lib/"

If you are using a bash shell (often the default with Linux), then add this line to your .bashrc file in your main directory.

export LD_LIBRARY_PATH="/usr/local/glide/lib:/home/admin/Mesa-3.0/lib/"

To compile:
Since the command line was so extensive, I just created an alias command in my .bashrc file. You probably don't need this many options, but it doesn't seem to hurt, either.

alias xcc='gcc -I../include -O3 -fPIC -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DSHM -DUSE_X86_ASM -D_REENTRANT -DTHREATS -DPTHREADS -L../lib -lglut -lMesaGLU -lMesaGL -lm -L/usr/X11/lib -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lpthread'
Page created: 13. September 2001
Last modified: 13. September 2001