----- Original Message ----- From: "Ben Crane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 1:07 AM Subject: Accessing C/C++ Dlls using perl
> Hi all, > > I've tried this question in a forum dedicated to MITAB > dlls (it's a series of c/c++ libraries designed to > access MapInfo data) to no avail. My question is: > > can you access and use c/c++ dll's in perl?? At the > moment, I have a MapBasic script pulling information > from MapINfo and dumping into txt files for loading > into a mysql database (using perl)...but I want to > have 1 program to do everything...so I need to access > MI data through perl via these dlls/libraries? > > Is this possible? and how would you link to > them...similar to the declare statements in VB? > > Ben > Hi Ben - Yes, this can be done. You need to use one of the following approaches: 1) Make a module with an XS component (the Perl module c language). You may access your dlls there; Please see 'perlxstut' and 'perlxs' for details. 2) use "Inline::C" and/or "Inline::C++" from CPAN. In theory these modules let you write c/c++ code 'inline' in your Perl script. I have had problems getting them to work (?). If you need a 'skeleton' XS module after reviewing XS documentation, please let me know and I will send you one. Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]