in reply to Inline::C better than XS?

Here is how to wrap foo.c's foo() function and link libprefoo.so. Adapted from Inline:C-Cookbook.

package First; use Inline C => Config => LIBS => ' -lprefoo '; use Inline C; # (Added) foo_wrapper(); _DATA_ _C_ #include <foo/prefoo.h> #include "foo.c" void foo_wrapper { foo(); }
You really only need a wrapper if the desired perl syntax differs from that of the C call.

After Compline,
Zaxo