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

Re: How to load DLL using XSLoader.pm

by bulk88 (Priest)
on Jan 11, 2013 at 12:09 UTC ( #1012873=note: print w/ replies, xml ) Need Help??


in reply to How to load DLL using XSLoader.pm

If it wasn't compiled with Makefile.PL or Build.PL, you can't use XSLoader on it. XS libraries/DLLs can only be used within the same minor (middle number) version. You can NOT under any circumstance use a XS module compiled with 5.12 on 5.14 or a XS module compiled with 5.14 on 5.12 Perl. Or a 5.12 XS module with a 5.10 or 5.16 Perl. You can use an XS module compiled with Perl 5.12.3 with Perl 5.12.1 at runtime or any other permutation aslong as the first and 2nd numbers match. The last number can change, but Perl guarantees ABI between maintenance releases. XSLoader is not for loading non-XS DLL (although it looks like you have an XS DLL since it is linked to Perl 5.6). If you are crazy, on 32 bit Windows, and want pain, you can use Dynaloader to load non-XS DLLs, without Win32::API, see Pure Perl module(245 lines) that calls external libraries - no XS file..


Comment on Re: How to load DLL using XSLoader.pm
Re^2: How to load DLL using XSLoader.pm
by Anonymous Monk on Jan 11, 2013 at 12:41 UTC

    can only be used within the same minor (middle number) version.

    most of the time, lots of times even that isn't guaranteed

Re^2: How to load DLL using XSLoader.pm
by PerlRider (Initiate) on Jan 16, 2013 at 04:19 UTC

    Hi, Thanks for your valuable reply... I want to load the C DLL to call couple of C functions from perl. I want to try with XSLoader to load the DLL. I am knew to use this XSLoader. Can you please let me know the sample Makefile.PL to compile it and if any prerequisites.

      read perlxstut. You will have to write C code if you go that route. Perlmonks supports people writing XS code or C code for Perl.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2014-12-18 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (61 votes), past polls