Admin Stuff

The difficult part is using the (non-default) gcc-3.4 instead of the (default) gcc (which is at version 3.3) and really getting STLport and Boost to work together. Additionally I normaly want to link statically to STLport and Boost to reduce the number of external dependencies.

Building STLport

 #define _STLP_NATIVE_INCLUDE_PATH ../include

 # make -C build/lib -f gcc.mak CC=gcc-3.4 CXX=g++-3.4 all release-static dbg-static stldbg-static
 # make -C build/lib -f gcc.mak CC=gcc-3.4 CXX=g++-3.4 install

 # sudo mkdir -p /usr/local/STLport-5/lib
 # sudo cp -r stlport /usr/local/STLport-5
 # sudo cp -r lib /usr/local/STLport-5/lib/dynamic
 # sudo cp $(find -name "*.a") /usr/local/STLport-5/lib

When linking against this Version of STLport, you need to add /usr/local/STLport-5 to the front of the include and library path (-I and -L options)

Building Boost

Building boost is now almost straight forward. Only the multithreading enabled and static version is built since thats the only version of the STLport lib built above (I have not found out how to build several versions of STLport with and without mt etc.)

 # bjam \
       "-sTOOLS=gcc-stlport" \
       "-sBUILD=debug release <threading>multi <runtime-link>static" \
       "-sSTLPORT_5_PATH=/usr/local/STLport-5" \
       "-sSTLPORT_VERSION=5" \
       "-sGXX=g++-3.4" \
       "-sGCC=gcc-3.4" \

Now boost can be copied to some central location:

 # sudo mkdir -p /usr/local/Boost/lib/dynamic
 # sudo cp -d boost stage/lib/*.a /usr/local/Boost/lib
 # sudo cp -d boost stage/lib/*.so* /usr/local/Boost/lib/dynamic

Using the libraries

Of course you have to add the correct include/libarary dirs. However there are some other pitfalls: