打开vs的32位命令行工具测试
进入到boost源代码文件夹中ui
进入到boost源代码文件夹中spa
运行bootstrap.bat.net
执行以下操做,对boost进行编译命令行
(msvc版本14.0对应的是vs2015,--stagedir是指定编译后存放的目录,文章附录有vs版本对应编号)线程
bjam stage --toolset=msvc-14.0 --without-graph --without-graph_parallel --stagedir="D:\boost\boost_1_63_0\bin\vc14" link=static runtime-link=shared runtime-link=static threading=multi debug release
进入到boost源代码文件夹中
运行bootstrap.bat
执行以下操做,对boost进行编译
(msvc版本14.0对应的是vs2015,--stagedir是指定编译后存放的目录)
bjam stage --toolset=msvc-14.0 architecture=x86 address-model=64 --without-graph --without-graph_parallel --stagedir="D:\boost\boost_1_63_0\bin\vc14-x64" link=static runtime-link=shared runtime-link=static threading=multi debug release
这样获得的是就是64位的boot库
设置测试的程序为64位
设置附加的包含路径(下载以后解压的boost文件夹):
设定库路径:
而后创建第一个boost项目,代码以下:
附上版本对应编号
附带一个boost使用线程池的例子
stagedir用来指定库存放的位置
bjam stage --toolset=msvc-14.1 architecture=x86 address-model=64 --without-graph --without-graph_parallel --stagedir="c:\boost\boost_1_64_0\bin\vc141-x64" link=static runtime-link=shared runtime-link=static threading=multi debug release
编译32位:
bjam stage --toolset=msvc-14.1 --without-graph --without-graph_parallel --stagedir="c:\boost\boost_1_64_0\bin\vc141-x86" link=static runtime-link=shared runtime-link=static threading=multi debug release
要等好一下子的.