Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: How to load DLL using

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

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..

Replies are listed 'Best First'.
Re^2: How to load DLL using
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
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012873]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2018-06-18 19:34 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (110 votes). Check out past polls.