tags:

views:

63

answers:

1

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
What you've described gives the raw C functions - but you probably need the XS wrapping too.
Jonathan Leffler