vs2013编译boost库
来源:互联网 发布:linux安装压缩软件 编辑:程序博客网 时间:2024/04/29 23:43
- 32位编译:
1.打开一个命令行,进入boost所在目录,运行bootstrap.bat
2.编译命令:
bjam.exe stage --toolset=msvc-12.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-serialization --without-wave --without-atomic --without-chrono --without-random --without-regex --without-test --without-thread --without-program_options --without-serialization --without-signals --stagedir=".\bin\vc12_x86" link=static runtime-link=shared threading=multi debug release
- 64位编译:
x64环境下编译得先从开始菜单启动Visual Studio 2013的vs2013 x64兼容工具命令行,而不是随便打开任意一个命令行窗口就行。然后转到boost根文件夹,运行bootstrap.bat生成x64版的bjam.exe。然后运行命令:
bjam.exe stage --toolset=msvc-12.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-serialization --without-wave --without-atomic --without-chrono --without-random --without-regex --without-test --without-thread --without-program_options --without-serialization --without-signals --stagedir=".\bin\vc12_x64" link=static runtime-link=shared threading=multi debug release address-model=64
使用runtime-link=shared选项编译出来的结果如:libboost_chrono-vc120-mt-1_55.liblibboost_chrono-vc120-mt-gd-1_55.lib使用runtime-link=static选项编译出来的结果如:libboost_chrono-vc120-mt-s-1_55.liblibboost_chrono-vc120-mt-s-gd-1_55.lib编译结果不同后缀的含义:mt : Multi threadings: Staticgd: ABI with debug version
- 命令行选项解释:
stage/install:
stage表示只生成库(dll和lib),install还会生成包含头文件的include目录。本人推荐使用stage。
toolset:
指定编译器,可选的如borland、gcc、msvc(VC6)、msvc-12.0(VS2013)等。
without/with:
选择不编译/编译哪些库。因为mpi等库我都用不着,所以排除之。另外,wave、graph、math、regex、test、program_options、serialization、signals这几个库编出的静态lib都非常大,所以不需要的也可以without掉。这可以根据各人需要选择,默认是全部编译。但是需要注意,如果选择编译python的话,是需要python语言支持的,应该到python官方主页http://www.python.org/下载安装。
stagedir/prefix:
stage时使用stagedir,install时使用prefix,表示编译生成文件的路径。
link:
生成动态链接库/静态链接库。生成动态链接库需使用shared方式,生成静态链接库需使用static方式。一般boost库可能都是以static方式编译,因为最终发布程序带着boost的dll感觉会比较累赘。
runtime-link:
动态/静态链接C/C++运行时库。同样有shared和static两种方式,这样runtime-link和link一共可以产生4种组合方式,各人可以根据自己的需要选择编译。一般link只选static的话,只需要编译2种组合即可,即link=static runtime-link=shared和link=static runtime-link=static。
threading:
单/多线程编译。一般都写多线程程序,当然要指定multi方式了;如果需要编写单线程程序,那么还需要编译单线程库,可以使用single方式。
debug/release:
- vs2013编译boost库
- vs2013编译boost库
- vs2013 boost库编译小结
- vs2013 boost库编译小结
- vs2013 boost库编译小结
- VS2013 Qt5.4 编译安装Boost库
- VS2013编译boost
- 在Windows平台VS2013环境下编译Boost库
- win8 64位 VS2013下boost库的编译
- 编译并使用boost库(win7+boost1.60+vs2013)
- 编译并使用boost库(win7+boost1.60+vs2013)
- VS2013配置Boost库
- vs2013添加boost库
- 编译Boost 详细步骤 适用 VS2013
- vs2013编译boost及相关的配置
- Win10 VS2013编译Boost 1.62.0
- VS2013下配置boost库
- VS2013下安装Boost库
- linux下搭建svn服务器
- 邮箱组件开发(使用javamail开发)
- 嵌入式产品开发流程
- 第一课的课后练习
- HDU 1789Doing Homework again 贪心
- vs2013编译boost库
- Java中字节流和字符流的基本认识
- 正则表达式大全
- Swift学习之路 -- 协议、扩展和泛型
- HttpUrlConnection 网络请求工具类
- iOS 打印类型
- iOS域名转解析为IP
- VMware虚拟机中ubuntu系统用户密码忘记解决办法
- mysql大数据高并发处理