Python和C++交互
作者:网络转载 发布时间:[ 2014/10/24 10:49:21 ] 推荐标签:软件开发 C++ Python
8.在MyPython项目里添加接口文件MyPython.i。
%module(directors="1") MyPython
%{
#include "../MyDll/MyDll.h"
%}
%feature("director") CMyDll;
%include <windows.i>
%include <std_string.i>
%include "../MyDll/MyDll.h"
9.在MyPython.i的属性设置里面设置Custom Build Tool。

10.编译MyPython.i生成MyPython.py和MyPython_wrap.cxx,把MyPython_wrap.cxx添加到工程MyPython,并设置工程如下,Build工程MyPython生成_MyPython.pyd.




本文内容不用于商业目的,如涉及知识产权问题,请权利人联系SPASVO小编(021-61079698-8054),我们将立即处理,马上删除。

sales@spasvo.com