Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl Embeded inside C

by rajiyer (Acolyte)
on Apr 09, 2003 at 11:04 UTC ( [id://249194]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I am using ActivePerl 5.6.1 Build 635. I have written C code that would invoke some Perl function that uses extension modules (like PerLDAP). This program works fine as long as it picks up perl56.dll from the Perl installation folder (say C:\Perl\bin). But if I copy the same perl56.dll to the folder containing my executable, then, I get an error saying: @INC contains only ..Hence cannot find the extension module. Any guesses why? Regards, Raj

Replies are listed 'Best First'.
Re: Perl Embeded inside C
by defyance (Curate) on Apr 09, 2003 at 15:16 UTC
    I don't know much about Win32 and Perl, but it sounds like the list that Perl looks at to find important things, @INC, looks for perl56.dll in C:\Perl\bin. When you move it you have to tell it where to find perl56.dll, maybe you could try

    use lib("/path/to/perl56.dll");

    at the top of your Perl program.

    Just a thought.

    -- Can't never could do anything, so give me and inch, I'll make it a mile.

Re: Perl Embeded inside C
by jand (Friar) on Apr 09, 2003 at 19:43 UTC
    Perl on Windows looks for the lib and site\lib directories relative to the location of the perl56.dll (or perl58.dll for Perl 5.8). So you would have to copy the lib and site\lib trees too. E.g. if your application (and perl56.dll) are in C:\usr\MyApp then you would need to move C:\Perl\lib to C:\usr\lib and C:\Perl\site\lib to C:\usr\site\lib.

    Why don't you just leave perl56.dll in the C:\Perl\bin directory?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-18 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found