开发者

SWIG cross platform

My application is using SWIG to communicate between c++ and python on windows.

suppose if my interface is "example.h"

swig is generating example.py, example_wrap.cxx

  /* File : example.i */
%module 开发者_StackOverflowexample

%{
#include "example.h"
%}
%include "std_string.i"
%include "std_wstring.i"
%include "example.h" 

I am porting my application to MAC. Do i need to generate example.py, example_wrap.cxx on mac? or can i use already generated files ?


SWIG generates the same code regardless of the platform it is executed on.

If any parts of that code are OS/Compiler/etc.-specific (e.g. calling conventions on Windows for C#), this is handled by conditional compilation for C++ resp. similar techniques in the target language.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜