[Gllug] bored programmer needs help
Jon Dye
jon at pecorous.co.uk
Wed Dec 17 12:41:18 UTC 2003
Dave van Zijl wrote:
>>1. is there any way in perl i can call functions that are in a C library
>
> somwhere?
>
>>(like native methods in java) without all the bother of re-compiling perl
>
> etc.
>
> Sure, we use SWIG (http://www.swig.org/) which basically creates a Perl
> wrapper (.pm) around a .so and you specify which methods to make available
> to the .pm. It has a few problems (doesn't handle certain overloaded methods
> very well - eg when the only difference is the data type of parameter
> expected) but is quite decent
Which is only a problem with C++ as you can't overload methods in C.
JD
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list