boost 编译

 boost 版本:1.53.0

 编译环境: windows 2008 -64bit

 编译工具: visual stutio 2010



1.生成 bjam.exe b2.exe

运行bootstrap.bat

2.生成boost库

打开Visual Studio x64 Win64 Command Prompt (2010)        【在visual stutio tools下】

执行

bjam --toolset=msvc-10.0 architecture=x86 address-model=64 --with-system --with-thread --with-date_time --with-filesystem --with-serialization  --with-chrono --variant=debug

生成64bit库的关键选项:

address-model=64

会在 boost目录的stage目录下生成上述库

参数解释:

bjam参数
--build-dir= <builddir> 编译的临时文件会放在builddir里(这样比较好管理,编译完就可以把它删除了)
--stagedir= <stagedir> 存放编译后库文件的路径,默认是stage
--build-type= complete 编译所有版本,不然只会编译一小部分版本(确切地说是相当于:variant=release, threading=multi;link=shared|static;runtime-link=shared)
variant= debug|release 决定编译什么版本(Debug or Release?)
link= static|shared 决定使用静态库还是动态库。
threading= single|multi 决定使用单线程还是多线程库。
runtime-link=static|shared 决定是静态还是动态链接C/C++标准库。
--with- <library> 只编译指定的库,如输入--with-regex就只编译regex库了。
--show- libraries 显示需要编译的库名称













tips:

The “lib” prefix is for static libraries. Use link=static
The ‘s’ letter is to static linking to runtime. Use runtime-link=static
The ‘d’ is debug, use variant=debug
The ‘g’ is using debug runtime, I think it’s included in ‘debug’ variant



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值