This is probably a really easy question to answer...

I have the following very basic c function;

 double foo(double Zx, double Zy, double Cx, double Cy)
 {
  return Zx + Zy + Cy + Cx;
 }

it lives in foo.c

I try to call in julia using;

run(`gcc foo.c -O3 -dynamiclib -o foo`) #-> compile it
ccall( (:foo, "foo"), Cdouble,(Cdouble, Cdouble, Cdouble, 
Cdouble),arg1,arg2,arg3,arg4)

it just returns arg1!

I'm sure im doing something very silly probably in the c code...any help 
would be much appreciated!

Reply via email to