----- Original Message -----
From: "Vajramatti Shashidhar (DS/EES1)" <***@de.bosch.com>
To: <perl-***@perl.org>
Sent: Thursday, June 21, 2007 6:38 PM
Subject: Using c++ dll in perl
Post by Vajramatti ShashidharHello,
Can someone tell me the method to use a c++ dll in perl?
I've assumed you're running ActiveState Perl (?)
I think Inline::C, Inline::CPP, and Win32::API will all enable access to C++
dll's - though there are certainly some caveats wrt Win32::API.
I prefer the Inline approach - though that requires a compiler - either
MSVC++ or (so long as you have build 815 or later of ActivePerl) the freely
available MinGW port of gcc. For an example of how to access a dll using
Inline::C see
http://search.cpan.org/~ingy/Inline-0.44/C/C-Cookbook.pod#Win32 . (The same
principle applies to accessing via Inline:CPP - but use Inline::C unless
there's stuff you want to do that really *needs* Inline::CPP.)
There's also XS - which, basically, is the process that Inline::C and
Inline::CPP automate for you.
Oops - I assumed you were posting to the perl-win32-users list, where I'm
also subscribed - but I now notice you've posted to the xs mailing list ....
so you obviously know that an XS option exists :-)
I think you'll find Inline helpful - <plug> and if you ever want to convert
your Inline::C/CPP code to an XS file there's InlineX::C2XS and
InlineX::CPP2XS on CPAN. </plug>
And there's also something called SWIG - about which I know absolutely
nothing.
Cheers,
Rob