开发者

SWIG cross platform

开发者 https://www.devze.com 2023-01-21 03:52 出处:网络
My application is using SWIG to communicate between c++ and python on windows. suppose if my interface is \"example.h\"

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

精彩评论

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

关注公众号