CentOS下编译boost1.48.0

2014-11-24 08:47:15 ? 作者: ? 浏览: 1

文档约定
$BOOST_ROOT:表示boost的根目录,本例为/vendor/boost/boost_1_48_0。


1)生成bjam
进入$BOOST_ROOT
#cd
执行bootstrap.sh,生成bjam
#./bootstrap.sh



2)编译
在$BOOST_ROOT/下执行如下命名:
bjam --toolset=msvc-8.0 --with- stage debug threading=multi link=shared
bjam部分选项,参数说明:
--toolset=gcc|msvc-8.0|msvc-10.0|borland-6.0,开发环境/编译器,msvc-8.0为vs2005,msvc-10.0为vs2010,borland-6.0为C++builder6.0
threading=single|multi,决定使用单线程还是多线程库,multi为多线程,single为单线程
link=shared|static,连接选项,shared为共享dll,static为静态库
runtime-link=static|shared,决定是静态还是动态链接C/C++标准库
--with-,只编译指定的库,如输入--with-regex就只编译regex库
--show-libraries 显示boost包含的库
生成文件输出在$BOOST_ROOT/bin.v2/libs/regex/build/msvc-8.0/debug/threading-multi



例如,编译filesystem
bjam --toolset=gcc --with-filesystem stage debug threading=multi link=shared
编译所有库
bjam --toolset=gcc stage debug threading=multi link=shared


-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: