How can I access .a library files in Perl?
+4
A:
Convert your static library to a dynamic one, then use the usual ways to load it: XSLoader
/ DynaLoader
, perlxs / C::DynaLib
Conversion steps (not fully tested): ar -x lib.a; gcc -shared *.o -o lib.so
daxim
2010-09-17 12:52:57
What you've described gives the raw C functions - but you probably need the XS wrapping too.
Jonathan Leffler
2010-09-17 13:04:35