1.准备
运行 bootstrap.bat
2.project-config.jam的设置
using msvc ;
using python
: 2.7
: d:\\python27
: d:\\python27\\include
: d:\\python27\\libs
;
如果不设置python路径的话,会导致有很多无法解析的符号的错误。
3.生成
x64 debug
bjam --with-python --prefix=d:\boost stage toolset=msvc-10.0 variant=debug link=shared address-model=64 threading=multi runtime-link=shared install
x64 release
bjam --with-python --prefix=d:\boost stage toolset=msvc-10.0 variant=release link=shared address-model=64 threading=multi runtime-link=shared install
在64位编译32位的boost python
1. 安装32位的python
2.同上面设置
3.使用下面的命令
bjam --with-python --prefix=d:\boost stage toolset=msvc-10.0 variant=debug link=shared address-model=32 architecture=x86 threading=multi runtime-link=shared install
编译所有的静态库
bjam --prefix=g:\boost stage toolset=msvc-10.0 variant=debug address-model=32 architecture=x86 threading=multi install

这篇博客详细介绍了如何在64位系统上编译32位和64位的Boost.Python库。首先,通过运行bootstrap.bat开始编译过程。接着,在project-config.jam中配置Python的路径以避免编译错误。使用bjam工具,分别针对调试和发布模式,以及不同的地址模型和线程设置进行编译和安装。对于在64位系统上编译32位库,需要安装32位Python并调整命令参数。
598

被折叠的 条评论
为什么被折叠?



