Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

dynamic loading

by rocketboy (Novice)
on May 07, 2006 at 06:52 UTC ( #547867=perlquestion: print w/replies, xml ) Need Help??
rocketboy has asked for the wisdom of the Perl Monks concerning the following question:

hello monks,

I run a perl subroutine( call it A) which in turn issues a system call thereby calling a c executable (call it B). Now this C executable(B) has perl embedded in it. the newly developed perl interpreter (called by B ,say I name it as D ) has to make use of another perl code segment (D)which loads library at run time .

this perl code segment(D) has commands like "use " and has "use POSIX ; ".

Now when I run A ,i get the following error:

Can't Load POSIX.Dyanmic loading not available in this perl. You may need to build a new perl executable which supports dynamic loading or has the POSIX module statically linked to it.

please explain in layman's terms what could be done to solve this problem and also there can't be any modifications in the procedure i.e I need to call a c executable which has perl embedded in it from another perl subroutine.

thank you.

Replies are listed 'Best First'.
Re: dynamic loading
by kvale (Monsignor) on May 07, 2006 at 07:11 UTC
    Although you have a complex calling sequence, the real problem is with your embedded perl. Whoever embedded perl in the C program did not include the dynamic loading code library appropriate to your operating system. What this means is that pure perl modules, such as will work, but modules that use C libraries, such as POSIX, will not be able to load and execute properly.

    If you are a layman, talk to the person who wrote the C program and ask them to configure the embedded perl to use dyamic loading and to build the C app with the above mentioned libraries for dynamic loading.


      I am the one who wrote the c code . Thank you for your suggestions. This is really great. I get replies so quickly. Thats awesome.
Re: dynamic loading
by vkon (Curate) on May 07, 2006 at 07:23 UTC
    this exactly described in perldoc perlembed, search for your error
      Thank you.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://547867]
Approved by davido
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2018-06-23 11:19 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.