b2 toolset=msvc-14.0 architecture=x86 address-model=64 link=static variant=debug,release threading=multi runtime-link=static --with-coroutine --with-context --with-container --with-graph --with-signals --with-signals --with-iostreams --with-filesystem --with-date_time --with-thread --with-serialization --with-regex --with-system --with-program_options --with-math --with-mpi --with-python --with-wave --with-test --with-atomic --with-chrono --with-exception --with-locale --with-log --with-random --with-timer --stagedir="E:\boost_1_63_0\64" --build-dir="E:\boost_1_63_0\64\build"
b2 --with-system --with-thread --with-date_time --with-regex --with-serialization stage
|
boost::asio
bjam install --toolset=msvc-10.0 architecture=x86 address-model=64 --build-type=complete --prefix="E:\boost_1_64_0\boost_1_64_0\bin\vc10_x64" link=static runtime-link=shared threading=multi debug release
解释一下命令的意思:
1. bjam: 编译工具;
2. install/stage:stage表示只生成库文件(DLL和Lib),install还会生成包含头文件的include目录;
3. toolset:表示编译器工具,我安装的是VS2010,所以是msvc-10(如果你是VS2005,可以使用msvc-8.0 VS2008是msvc-9.0);
4. architecture:表示架构,也就是你的CPU架构x86;
5. address-model:表示地址长度,32/64
6. build-type: complete表示全部编译;
7. prefix:但是使用install时,表示安装目录,当使用stage时,是:--stage="xxx",表示输入库路径;
8. link:表示生成动态/静态链接库,动态链接库是shared,静态链接库是static,一般都会编译成静态库,因为给出程序的时候打包boost的库会非常庞大;
9. runtime-link:shared/static, 表示动态/静态链接C/C++运行时库(C/C++ Runtime),我们选择了动态链接;
10. threading:表示单/多线程编译,一般我们的程序都会用到多线程,所以选择了multi;
11. debug release:表示生成debug和release库;
12. without/with:表示不需要编译/需要编译哪些库,一些自己不用的库可以无需编译;
————————————————
版权声明:本文为CSDN博主「Daozy极限编程」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/tencupofkaiwater/article/details/75514425