Re: Question about creating modules
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Sun, 28 May 2006 14:00:47 +1000
"Mr Cheeky Monkey" <cheeky.monkey23@xxxxxxxxxxxxx> wrote in message
news:u8udnV4oIYYcJuXZnZ2dnUVZ8qGdnZ2d@xxxxxxxxx
Hi,documentation.
I'm new to perl and need a little help. I'm using ActiveState Perl under
windows. I've tried creating a module from a C++ source using swig and the
methods outlined in both the perl documentation and the swig
I have VC++ installed and making the dll files works successfully.
Which version of VC++ ? With ActiveState perl you really should be using 6.0
(as that's what was used to build perl), though you'll *generally* get good
milage from other (later) VC++ versions. I don't know if/how such a mismatch
would impact upon swig.
However
when I try to load the module the perl interpreter seems to loop forever.
The problem seems to occur at the bootstrap stage. Unfortunately I don't
know enough to make a good guess as too what's going on.
In fact, I know stuff-all about swig - so, if you're committed to using
swig, I can't be of much use :-)
However, if you're simply trying to access a dll, there are a number of
other options.
You could use Inline::C (or perhaps in this case Inline::CPP would be more
appropriate).
Or you could write your own extension (module) with XS - which is pretty
much what Inline::C/Inline::CPP do, though they do it using an automated
process. There's a good example of accessing a dll in the Inline::C cookbook
(see the section "Just Desserts" in perldoc Inline::C-Cookbook).
Another alternative is to use Win32::API - for which no compiler is needed,
and which is a fairly popular hack (though I personally prefer to avoid it).
C++
I'm using version 5.8.8 of perl and I have stripped out everything in my
code, recompiled and made the library and still it wont load.
Make sure you're using build 817 (or later):
perl -e "print $ActivePerl::VERSION"
Build 816 (which is a 5.8.8 build) is a bad build and should be avoided
altogether.
Cheers,
Rob
.
- References:
- Question about creating modules
- From: Mr Cheeky Monkey
- Question about creating modules
- Prev by Date: Re: Error In Using Perl To Connect To MySQL
- Next by Date: Net::Server -> tftpd ?
- Previous by thread: Question about creating modules
- Next by thread: Net::Server -> tftpd ?
- Index(es):
Relevant Pages
|