FWIW, DynaLoader does not load .a files on other platforms. Net::Pcap perhaps links against a static library (libpcap.a), but DynaLoader should still load dynamic library auto/Net/Pcap.so
I'm sure that there must be a much better, Perlish way to find out whether an object file (or a C header) exports a certain symbol or not.
Maybe the configure/autotools approach, see ExtUtils::CChecker, Objects in this class provide an extension around ExtUtils::CBuilder to simplify the creation of a .c file, compiling, linking and running it, to test if a certain feature is present.
I briefly toyed with the idea of parsing the output of nm $libfile, but that will break on MSVC, and also, I know nothing about the different incarnations of nm
How about you pack your own copy of nm or objdump? Its dumpbin for msvc.
In reply to Re: On Yaks and the Shaving Thereof - finding exported symbols of a C library
by Anonymous Monk
in thread On Yaks and the Shaving Thereof - finding exported symbols of a C library
by Corion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |