C++ Frontend Tales

All | Boost | General | Loki
« Previous day (Apr 5, 2007) | Main | Next day (Apr 6, 2007) »

20070406 Friday April 06, 2007

How to compile Boost 1.34 with stlport

Upcoming Boost 1.34 still has not been released. But it is in a very good shape and compatible with Sun C++ without any annoying patches. If you do not want to get it by CVS you can take its CVS snapshot here. Unfortunately there is one, at least one :-) problem with this version. By default it uses libCstd.2.1.1. This leads to enormous number of errors. Are there any workaround? Sure!

  1. Download and unpack tarball. Let's suppose the created directory name is 'boost'.
  2. cd boost
  3. Create in this directory file 'user-config.jam' with following content (spaces are important):
    import toolset : using ;
    using sun :  : <path to your Sun C++ compier>/bin/CC : <cxxflags>-library=stlport4 <linkflags>-library=stlport4 ;
    
  4. Build 'bjam' utility as described here. And put it on your $PATH.
  5. Run bjam --v2 -sBOOST_BUILD_PATH=`pwd` --toolset=sun stage
That's all.
Permalink Comments [8]