Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Perl Embed: How to solve Dynamic Loading

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

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!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found