现在的位置: 首页 > 综合 > 正文

boost安装

2018年10月19日 ⁄ 综合 ⁄ 共 812字 ⁄ 字号 评论关闭

1、http://www.boost.org/,下载1.54

2、解压20分钟

3、bootstrap 然后 bjam.exe一个小时。有人说要先装zlib、python等,暂时没装,不知道行不行。中间提示iso8859-1.hpp文件编码不是unicode。

4、http://hi.baidu.com/vc_net/item/3dc5d0d9f07741e955347f45

5、编译sgd  H:\boost>bjam --tolset=msvc-10.0 architecture=x86 --build-type=complete  link=static runtime-link=s
tatic threading=multi stage

6、release程序需要 -s  debug需要-sgd的库

其他参考:

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 显示需要编译的库名称

抱歉!评论已关闭.