SWIG deep-dive

SWIG is a software development tool that is used to parse C/C++ interfaces and generate glue-code for higher level programming languages.
SWIG is a failry complete C++ compiler with support for nearly all the language features. SWIG can also be used to package structures and classes into proxy classes in the target higher level language.

example.iexample.i
1
2
3
4
5
6
7
8
9
10
11
%module example
%{
/* Put headers and other declarations here */
extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);
%}

extern double My_variable;
extern int fact(int);
extern int my_mod(int n, int m);

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×