15-869 Course Software


The starter code we provide for programming assignments will make use of the following libraries: We'll primarily be supporting SGI machines and Linux machines, but the starter code we provide should compile without too much difficulty on other UNIX machines such as Suns and HP's, or on Windows 95/98/NT. To get the latter to work, you may have to download Mesa and FLTK yourself, if they're not on your system already, install them, and set up a new Makefile.

Compiling

If you're on Linux, say, and you try "make -f Makefile.linux" and you get an error message such as: "/usr/include/GL/gl.h: I ain't got no idea where this file is!" then try the following, which updates the dependency list at the end of the Makefile:

make -f Makefile.linux depend


The following documentation is biased toward SGI's and Suns, but it's all we've written up so far.

Linking

You must link in different libraries when using OpenGL on Suns and SGI's. Typical link sequences are:
on SGI: -lforms -lGLU -lGL -lX11 -lm 
on Sun: -lforms -lMesaGLU -lMesaGL -lX11 -lXext -lsocket -lm 
and if you're linking with the pic_ and tiff_ routines that read and write TIFF and PPM picture file format, then you'll need -lpicio -ltiff as well.

You'll need to type the command

setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/afs/cs/project/classes-ph/869/pub/lib
for shared object files such as libfltk.so and libGL.so to be resolved correctly. On SGI's you'll need the additional line
setenv LD_LIBRARYN32_PATH /usr/lib32:/afs/cs/project/classes-ph/869/pub/lib32
when compiling with the -n32 compiler option and instruction set, as our makefiles do. It's probably a good idea to put these commands in your .login .

For hackers: You can get a list of shared object files that a given executable looks for, by running elfdump -Dl <PROGRAM> on an SGI or ldd <PROGRAM> on a Sun. If you're really curious about which versions of shared object files are getting linked in, you can set the following environment variables and this will affect the runtime linker, rld (on SGI's):

setenv _RLD_ARGS "-quickstart_info -v"
setenv _RLD_PATH /usr/lib/rld.debug
so that every time you run a program it will print gobs of info. To turn off the linker debugging info, do
unsetenv _RLD_ARGS
unsetenv _RLD_PATH

15-869, Image-Based Modeling and Rendering
Paul Heckbert, Sept. 1999