469,641 Members | 1,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

structure C, transform to Python by using Swig

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;
struct Vector{
double x,y,z;
%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?
Aug 9 '07 #1
0 1001

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Gary | last post: by
reply views Thread by Helmut Zeisel | last post: by
13 posts views Thread by Roy Smith | last post: by
1 post views Thread by Arthur Chereau | last post: by
6 posts views Thread by matey | last post: by
reply views Thread by Basha J P M | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.