Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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 UserLib.pm " and UserLib.pm 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.

Comment on dynamic loading
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 UserLib.pm 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.

    -Mark

      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 (Deacon) on May 07, 2006 at 07:23 UTC
    this exactly described in perldoc perlembed, search for your error
      Thank you.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-10-01 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (34 votes), past polls