用clang3.4编译boost1.55

首先编译安装最新的boost 1.55库,

# wget -O boost_1_55_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.55.0%2F&ts=1385953406&use_mirror=softlayer-ams

然后解压

tar jxvf ./boost_1_55_0.tar.bz2  
进入目录后,执行

./bootstrap.sh --with-libraries=system,filesystem,log,thread,program_options --with-toolset=clang
./b2 toolset=clang cxxflags="-std=c++11"

稍等一会,编译成功。安装吧。

./b2 install --prefix=/usr

注意,我的Ubuntu是预先安装了gcc4.8.1.


你可能感兴趣的:(用clang3.4编译boost1.55)