我的应用程序使用SWIG在windows上的c++和python之间进行通信。
假设我的接口是"example.h“
swig正在生成example.py、example_wrap.cxx
/* File : example.i */
%module example
%{
#include "example.h"
%}
%include "std_string.i"
%include "std_wstring.i"
%include "example.h" 我正在将我的应用程序移植到MAC上。我需要在mac上生成example.py,example_wrap.cxx吗?或者我可以使用已经生成的文件吗?
发布于 2010-12-10 08:20:05
SWIG生成相同的代码,而不管它在什么平台上执行。
如果该代码的任何部分是特定于OS/编译器/等的(例如,在Windows for C#上调用约定),这将由C++的条件编译来处理。在目标语言中使用类似的技术。
https://stackoverflow.com/questions/3997595
复制相似问题