http://qs1969.pair.com?node_id=479630

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

Hi,
I embeded the Perl Interpreter into my C++ projekt. For simple scripts, i do not have a problem, but when the script loads Data::Dumper for example I get the follwing error:
Can't load module Data::Dumper, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the Data::Dumper module statically linked into it.) well, statically linking is not a option, i think. Is there a switch to turn this feature one?

This is perl, v5.8.7 built for MSWin32-x86-multi-thread
Visual C++ 6
  • Comment on Perl Embed: How to solve Dynamic Loading

Replies are listed 'Best First'.
Re: Perl Embed: How to solve Dynamic Loading
by esskar (Deacon) on Jul 30, 2005 at 18:48 UTC
    well, slap me. I found it myself. Had to add
    EXTERN_C void xs_init (pTHX); EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); EXTERN_C void xs_init(pTHX) { char *file = __FILE__; dXSUB_SYS; /* DynaLoader is a special case */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); }
    Found in perlembed pod!