From: Fnu, J. <Jim...@am...> - 2007-10-16 11:09:15
|
Hi William, Got it. Thanks:) Best Regards, Jimmy -----Original Message----- From: William Fulton [mailto:wi...@fu...] On Behalf Of William S Fulton Sent: Saturday, October 13, 2007 5:45 AM To: Fnu, Jimmy Cc: swi...@li... Subject: Re: [Swig-user] ruby simple example compiling problem You've only got the declaration shown. The body of the method has not=20 been put in the wrappers. The example also ships example.c, so if you=20 compile that then the C compiler will find the body of the method. William Fnu, Jimmy wrote: > Hi William, >=20 >=20 > I got this code from Examples/Ruby/simple and I didn't change a thing. > That's why I wonder why it's not working. > Regarding your answer, I'm a bit confused. Isn't the gcd method already > inside the "%{ %}" braces? >=20 > %module example > %inline %{ > extern int gcd(int x, int y); > extern double Foo; > %} >=20 > Thanks for answering my question. >=20 > Best Regards, >=20 > Jimmy >=20 >=20 > -----Original Message----- > From: William Fulton [mailto:wi...@fu...] On Behalf Of > William S Fulton > Sent: Thursday, October 11, 2007 2:24 AM > To: Fnu, Jimmy > Cc: swi...@li... > Subject: Re: [Swig-user] ruby simple example compiling problem >=20 >=20 > You aren't compiling any code that has the body of gcd. Put the gcd=20 > method within %{ %} braces. See the examples in the Examples/ruby=20 > directory for working examples. >=20 |