XS/XSUB FAQs? Tutorials?

J

Jeff

I'm looking for documentation beyond the perlxs and perlXStut docs.
Is there anything else available.

Theoretically, I have an easy problem to solve. However, I can't find
my answers in perlxs or perlXStut.

We have an existing C library (libxlate.so) that I would like to
reference in a Perl utility that we use quite a bit. I want to create
a Translate.pm module that my Perl utility can use to reference the
library's functions. None of the examples talk about something like
this. Does anyone have any suggestions?

Jeff
 
I

Iain Truskett

* Jeff said:
I'm looking for documentation beyond the perlxs and perlXStut docs.
Is there anything else available.

"Extending and Embedding Perl", Simon Cozens and Tim Jenness.
http://books.perl.org/book/147

See also: http://books.perl.org/category/20

[...]
We have an existing C library (libxlate.so) that I would
like to reference in a Perl utility that we use quite a
bit. I want to create a Translate.pm module that my Perl
utility can use to reference the library's functions. None
of the examples talk about something like this. Does
anyone have any suggestions?

I imagine h2xs will prove invaluable. Check it out.


cheers,
 
A

Anno Siegel

Iain Truskett said:
* Jeff said:
I'm looking for documentation beyond the perlxs and perlXStut docs.
Is there anything else available.

"Extending and Embedding Perl", Simon Cozens and Tim Jenness.
http://books.perl.org/book/147

See also: http://books.perl.org/category/20

[...]
We have an existing C library (libxlate.so) that I would
like to reference in a Perl utility that we use quite a
bit. I want to create a Translate.pm module that my Perl
utility can use to reference the library's functions. None
of the examples talk about something like this. Does
anyone have any suggestions?

I imagine h2xs will prove invaluable. Check it out.

Also, take a look at the Inline module. It supports building wrappers
to existing libraries. In simple cases (meaning that the parameters
and return values of the library functions are sufficiently simple),
it suffices to hand Inline the library's header file, and it builds
the wrapper module for you.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top