Hello everyone, I am trying to write Python wrap for C code which uses struct.
modules.c:
struct foo
{
int a;
};
struct foo bar;
modulues.i
%module nepal
%{
struct foo
{
int a;
}
%}
extern struct foo bar;
But during compiling I am given error:
In function ‘Swig_var_bar_set’: error: ‘bar’ undeclared (first use in this function)
Could you be so kind to help me how to correctly define export struct variable ?