boost编译过程 -- linux

CentOS 6.3 gcc 4.4.6 boost_1_53_0

boost编译过程很简单
1 #./bootstrap.sh --> 会生成bjam和b2这两个编译工具
2 #./b2 --> OK了. 生成的lib在./stage/lib下. 生成了static, runtime-lib=share, release的库.
3 将/usr/local/boost/boost_1_53_0/stage/lib设置lib搜索路径
  方法1: --> vi /etc/ld.so.conf 增加/usr/local/boost/boost_1_53_0/stage/lib
  方法2: --> vi $HOME/.bash_profile 增加export $LD_LIBRARY_PATH = /usr/local/boost/boost_1_53_0/stage/lib:.:$LD_LIBRARY_PATH

///////////////////////////
更多编译参数: ./b2 --help
例如:

./b2 stage --stagedir=/usr/local/boost/boost_1_53_0/stage/static/mtd --layout=versioned --build-type=complete variant=debug link=static threading=multi

./b2 stage --stagedir=/usr/local/boost/boost_1_53_0/stage/multi-debug variant=debug threading=multi

./b2 stage --stagedir=/usr/local/boost/boost_1_53_0/stage/multi-release variant=release threading=multi

详细解释, 看帮助准确一些.

你可能感兴趣的:(linux)