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.