And Lo, the Lion and the Sheep shall lie down together - but the Sheep won't get much Sleep.
    -- Woody Allen
Sourceforge Logo

Downloading and Installing PLIB.

The Short Answer (for Linux and CygWin users):

Make sure you have OpenGL installed.
Download this: PLIB - Version 1.8.5
Run this (as 'root'):
     tar xzf plib-1.8.5.tar.gz
     cd plib-1.8.5
     ./configure ; make install

The Long Answer: Downloading PLIB.

You can get PLIB in various versions here. We follow the common Linux convention where the second digit in the version number is EVEN for stable versions and ODD for unstable and/or experimental versions.

End users should generally download the latest stable version but application developers may wish to periodically compile their code against the odd-numbered version so as to keep abreast of developments in PLIB.

Download this using your browser by right-clicking on the name. If you have InternetExplorer, you'll probably fall victim to it's stupid bug where it unzips the file automatically - but forgets to rename it to lose the '.gz' off the end. Just rename it yourself before you try to un-tar it and all will be well.

PLIB documentation, example programs, fonts, etc are separated from PLIB itself to minimise your download time.

The online documentation attempts to always track the latest stable version of PLIB. If you are using some other version, you may want to download the documentation appropriate to that release which comes with the plib_examples tarball.

Un-tar this into a separate directory from PLIB itself - or else all the configuration and makefiles will clash. Many of the example programs require the GLUT library (or 'freeglut') - some other use SDL and FLTK.

More extensive PLIB demonstration programs are also separated from PLIB itself and are individually tarballed with their own version numbers. Generally, they'll run with the most recent stable version of PLIB - but occasionally they'll rely on something in the latest PLIB beta.

Un-tar these into a separate directory from PLIB itself - or else all the configuration and makefiles will clash.

The Long Answer: Installing PLIB.

On most Linux and other UNIX-like OS's, it's simply a matter of unpacking the tar-ball, changing directory into the plib_x.y.z directory that this creates and typing:

   make install

You'll need to be 'root' to perform the last step. At the end of that process, you should have a set of header files in /usr/include/plib and a set of corresponding libraries in /usr/lib. There are some example programs in the 'plib-x.y.z/examples' subdirectory.

WARNING: If you are using 'Mesa' instead of an 'Official' OpenGL, please make sure you followed the instructions in the Mesa installation notes that tell you to symbolically link /usr/lib/ and /usr/lib/ to their Mesa equivelents. More modern versions of Mesa may install directly into that location - but make sure that one way or another, /usr/lib/ points to your current OpenGL/Mesa library.

Some Linux distro's install OpenGL/Mesa in /usr/X11R6/lib - that is now officially deprecated - if your OpenGL/Mesa is installed there then I suggest you add symbolic links to make the files appear to be in /usr/lib.

If you are running some non-UNIX OS, (eg MS-Windows) there may be instructions on how to build PLIB in README.{OS name}. If you have problems - or can offer to streamline the process, then please pass on your knowledge via the mailing list. In general, it isn't complicated to install - you usually just have to compile all of the source files in each directory and link each subdirectory into a separate library. Don't try to make PLIB into a M$ '.DLL' - it's not worth the effort!

If you have the Microsoft Visual C++ suite, you'll find a set of project files - one in each source directory - plus a master workspace at the top of the tree.

If you have all the Cygnus (CygWin) compiler/tools, then use the UNIX build instructions.

There is now a README.mac for Macintosh users.

Where Does PLIB Install Itself?

This is always a controversial topic. In order to maintain our own sanity, we expect PLIB to be installed in one place and in one place only.

  Libraries are in:    /usr/lib/libplibXXX.a

  Headers are in:      /usr/include/plib/XXX.h

(Where 'XXX' is the short acronym for the PLIB library in question - in lowercase).

The now *VERY* obsolete PLIB 1.0.* used to install itself into /usr/local/plib, but from version 1.1.0 onwards, the modern location was adopted following discussions with several Linux distributors.

Please don't even think about arguing about this decision, it has been the topic of long and arduous discussion and it's NEVER going to change!

Steve J. Baker. <>