boost 1.32 - Python 编译通过记录
来源:互联网 发布:磁力搜索引擎软件 编辑:程序博客网 时间:2024/06/05 05:08
首先,编译boost_python.dll:
在目录boost/boost_1_32_0/libs/python/build/VisualStudio下,有vc的工程文件boost_python.dsw,我是用VC6编译的,这个文件刚好用:-)打开它。编译release还是debug随便,在tools->option->directories中,添加include file,D:/BOOST/BOOST_1_32_0和C:/TOOLS/PYTHON/INCLUDE(<pyconfig.h>文件路径),添加Library files,C:/TOOLS/PYTHON/LIBS(包涵python24.lib),然后就可以编译通过了,顺利!
接下来,编译教程中的hello.cpp,就是
>>import hello
>>hello.greet()
'Hello, world!'
的那个文件,要使用bjam,boost32里面那个就好用,至于Jamfile用原配的吧
需要注意的是:
set PYTHON_ROOT=c:/dev/tools/python
set PYTHON_VERSION=2.2
这两句话一定要执行一下,尤其PYTHON_VERSION,一定要是2.2,千万别耍小聪明,弄个2.3,2.4什么的,不然自讨苦吃,然后开始编译(使用vc6)
bjam -sTOOLS=msvc
很快就能得到hello.pyd,表示编译成功!
最后,把hello.pyd和boost_python.dll拷贝到同一个目录,如:D:/python/boost下,来到命令行运行:
D:/python/boost/python
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>import hello
>>hello.greet()
'Hello, world!'
>>
万事大吉。
在目录boost/boost_1_32_0/libs/python/build/VisualStudio下,有vc的工程文件boost_python.dsw,我是用VC6编译的,这个文件刚好用:-)打开它。编译release还是debug随便,在tools->option->directories中,添加include file,D:/BOOST/BOOST_1_32_0和C:/TOOLS/PYTHON/INCLUDE(<pyconfig.h>文件路径),添加Library files,C:/TOOLS/PYTHON/LIBS(包涵python24.lib),然后就可以编译通过了,顺利!
接下来,编译教程中的hello.cpp,就是
>>import hello
>>hello.greet()
'Hello, world!'
的那个文件,要使用bjam,boost32里面那个就好用,至于Jamfile用原配的吧
需要注意的是:
set PYTHON_ROOT=c:/dev/tools/python
set PYTHON_VERSION=2.2
这两句话一定要执行一下,尤其PYTHON_VERSION,一定要是2.2,千万别耍小聪明,弄个2.3,2.4什么的,不然自讨苦吃,然后开始编译(使用vc6)
bjam -sTOOLS=msvc
很快就能得到hello.pyd,表示编译成功!
最后,把hello.pyd和boost_python.dll拷贝到同一个目录,如:D:/python/boost下,来到命令行运行:
D:/python/boost/python
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>import hello
>>hello.greet()
'Hello, world!'
>>
万事大吉。
- boost 1.32 - Python 编译通过记录
- boost Python 编译通过记录
- Boost编译安装记录
- Boost python 编程记录
- 编译Boost Python
- 编译boost.python库
- vs2010 编译boost.python
- Boost::Python库编译
- VS2008 编译 boost::python boost::serialization 方法
- Solaris下编译Boost.Python
- Boost.python 编译和使用
- linux下编译boost.python
- boost.python编译及示例
- C++嵌入python ,通过boost.python
- LINUX下BOOST编译(记录一下)
- vs2008编译QT,Boost,OpenCV步骤记录
- 编译BOOST 1.32
- 在MinGW中编译Boost.Python
- 工作流引擎设计中的遍历算法的问题
- 函数参数的传递问题(一级指针和二级指针)
- Boost 1.46.1 - VS2008下直接安装使用
- Boost 1.46.1 - vc2005下编译
- 安装 cls文件
- boost 1.32 - Python 编译通过记录
- cppcheck c++静态代码检查
- JSF Select分组处理
- List of IP protocol numbers
- 菜鸟笔记2——Android Camera调用
- NLSX4014 电平转换器 引发的问题
- Android中的JSON详细总结
- 编码的理解
- gevent 一点点