Quote:
Originally Posted by cpp2quser
calling C/C++ function from perl
Hi,
how do I call a compiled C/C++ function from perl ?
Let say I have a C/C++ function:
Code:
*char func(char *ptr, int len) {
...
return str;}
Now i wonna call it from perl
|
Inline-0.44 from CPAN (which includes Inline::C), and there's also Inline::CPP. Or you may like to get straight into compiling XS code (which is more or less what Inline::C automates for you) - in which case you'd probably start with 'perldoc perlxstut'.
You can also look at
http://www.swig.org It is "a relatively quick and painless way of exposing your C/C++ program's internal API to the machinations of any scripting language."
And since you're into programming, spelling correctly would certainly help too.