juraj has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I'm writing a perl scripting support for my program. It was done fairly easily and quickly using the magic spell of SWIG. The whole thing is done as a dynamically loadable shared object and opened using dlopen(). The problem is with dynamic extensions. I have dynaloader, my plugin is "linked" with -lperl, so it works. But the extensions (like Data::Dumper) are not compiled using -lperl, so they don't know they need to load the perl library (mainly because they should work with interpreters, which have libperl.a linked to them statically).

Of course, libperl.so is in memory, but it's symbols are not mapped to the target library (because it does not request it). Is there any other way of doing it, than doing a wrapper library, which will first open libperl.so using dlopen with RTLD_GLOBAL and then my scripting support?

J.

Replies are listed 'Best First'.
Re: perl embedding and dynamic linker
by diotalevi (Canon) on Mar 24, 2003 at 09:47 UTC

    fever has a number of nodes on these sorts of subjects. Do a Super Search on that user.