My app is linked against -lxml2. The trouble is the PmmNodeToSv is provided by the perl library, not the c library.
i.e. PmmNodeToSv is in: /usr/lib/perl5/vendor_perl/5.8.3/i686-linux/auto/XML/LibXML/LibXML.so
I could link against that I guess, but how to find out where that library is on other peoples systems cleanly? | [reply] |
| [reply] [d/l] |
I can't find how to get at dl_find_symbol_anywhere() either :(
My C is being compiled using ExtUtils::Embed ldopts which links it against libperl and DynaLoader.a, which doesn't seem to include the dl_find_symbol_anywhere() symbol. Nor does "require DynaLoader" allow me to call it from Perl.
I'm stumped :(
| [reply] |
I've now managed to get a CODEREF to the routine I was after like this:
eval_pv(
"use DynaLoader;" \
"use XML::LibXML;" \
"my $pnts_symref = DynaLoader::dl_find_symbol_anywhere('PmmNod
+eToSv');" \
"my $coderef = DynaLoader::dl_install_xsub('kousei::PmmNodeToS
+v', $pnts_symref);"
TRUE
);
Trouble is, now I can't find how to call it from C with the args I need to pass. Calling it from perl is fine via &$coderef(), but the xmlNode I want to pass to it is in C.
Any clues? | [reply] [d/l] |