C++ Boost 1.33.1 on Slackware/Zenwalk:

  1. Download bjam slackware package(tgz) and boost-1_33_1 source package(tar.gz) from the sourceforge.net website:
    bjam for slackware
    c++ boost source package
    (or Google for the latest versions of these two packages)
  2. Save these two files in the home directory and then cd into it:
    sh# cd $HOME
  3. Install bjam(as root):
    sh# installpkg boost-jam-3.1.11-1-linuxx86.tgz
    sh# export PATH=$PATH:/boost-jam-3.1.11-1-linuxx86/
  4. Compile and install boost(as root):
    sh# tar xjvf boost_1_33_1.tar.bz2
    sh# cd boost_1_33_1
    sh# bjam “-sTOOLS=gcc” install

C++ Boost is now installed. This procedure doesn’t install the files in the default library paths, so compilation commands are slightly longer than they are for Gentoo and Debian/Ubuntu:

sh# g++ -o first first.cpp -I/usr/local/include/boost-1_33_1
sh# g++ -o second second.cpp -I/usr/local/include/boost-1_33_1 -L/usr/local/lib -lboost_filesystem-gcc

You can simplify this by adding the paths of boost folders to gcc library environment variables:

sh# export CPLUS_INCLUDE_PATH=/usr/local/include/boost-1_33_1
sh# export LIBRARY_PATH=/usr/local/lib

The compilation can now be performed using the following simple commands:

sh# g++ -o first first.cpp
sh# g++ -o second second.cpp -lboost_filesystem-gcc

The two ‘export’ commands can be added at the end of the profile file(/etc/profile or $HOME/.bash_profile) to avoid having to type them every time a new shell is opened. Other way to simplify the process would be to create symbolic links to boost library paths in the Slackware standard include paths so that gcc can find them directly.