Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Perl Embed: How to solve Dynamic Loading

by esskar (Deacon)
on Jul 30, 2005 at 18:24 UTC ( #479630=perlquestion: print w/replies, xml ) Need Help??

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

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!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://479630]
Approved by shenme
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2023-02-08 07:35 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (40 votes). Check out past polls.