您的位置:首页 > 编程语言 > Python开发

VS2013的boost.python编译

2018-02-13 20:54 579 查看
1.运行bootstrap.bat,会生成b2.exe和bjam.exe。

2.运行如下命令

b2 -a --with-python address-model=64 toolset=msvc runtime-link=static


编译release版本(x64)

bjam --with-python --prefix=c:\boost stage toolset=msvc-14.0 variant=release link=shared address-model=64 threading=multi runtime-link=shared install


编译debug版本(x64)

bjam --with-python --prefix=c:\boost stage toolset=msvc-14.0 variant=debug link=shared address-model=64 threading=multi runtime-link=shared install


注:

–prefix设置boost安装目录;

stage表示只生成库文件(dll与lib文件);

toolset指定编译器

variant决定编译什么版本;

link决定使用静态库还是动态库,shared是动态库,static是静态库;

address-model决定地址长度,即32还是64位程序;

threading决定使用单线程(single)还是多线程(multi)库;

runtime-link决定是静态(static)还是动态(shared)链接C/C++标准库;

install会生成包含头文件的include目录。

转自:

http://blog.csdn.net/lpp0900320123/article/details/52014741

http://blog.csdn.net/xingchenbingbuyu/article/details/70256648
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: