Hi The following perl program doesn't work. I have copied this to temp.pl and executed "perl temp.pl" use Inline C => Config => Structs => ['Foo'];
my $obj = Inline::Struct::Foo->new; $obj->num(10); $obj->str("Hello"); myfunc($obj); __END__ __C__ struct Foo { int num; char *str; }; void myfunc(Foo *f) { printf("myfunc: num=%i, str='%s'\n", f->num, f->str); } OUTPUT : I get the following error Can't locate object method "new" via package "Inline::Struct::Foo" (perhaps you forgot to load "Inline::Struct::Foo"?) at temp2.pl line 1. Please help. Also I have the following requirement. Any suggestion would help I have a C linked list 1) I would like to pass the linked list to the perl module to populate the data. 2) Once the data is populated, I would like to call a C library function. If I use the Inline::LIBS, I get error. Can someone help Thanks & Regards Sridevi