Hello
I am trying to convert and manage a simple structure C ,to Python by using C. The code is the following :
/* example.c*/
double sum(Vector c)
{
return c.x+c.y+c.z;
}
/*header.h*/
struct Vector{
double x,y,z;
}
/*interface_file.i*/
%module interface
%{
#include "structure.h"
%}
#include "structure.h"
I execute the following commands:
swig -python interface.i
gcc -c example.c interface_file_wrap.c -I/usr/include/python2.5
and after that an error appears:
example.c:3: error: expected ‘)’ before ‘c’
What is the solution?