编译Boost Python

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


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





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值