|Do you know where your variables are?|
Re: Wrapping a C shared library with Perl and XSby syphilis (Chancellor)
|on Mar 18, 2017 at 03:01 UTC||Need Help??|
I can't immediately see how:
MODULE = Test PACKAGE = main
MODULE = XS::Wrap PACKAGE = XS::Wrap.
Is that done by hand ?
I'd attack the problem using InlineX::C2XS, but few others seem to share my enthusiasm for that (with good reasons, no doubt).
That is, for me, one way is to cd to some directory and create ./src/Wrap.c, where that file contains your C code:
Then create a ./XS-Wrap-0.42 source distro directory.
Then create a ./build_src.pl that contains:
Then run perl build_src.pl
Then modify the files generated in ./XS-Wrap-0.42 as needed.
This could all be further customised and further automated, as could your approach.