Re^5: Extending perl with C dynamic library.by syphilis (Chancellor)
|on Aug 20, 2013 at 23:51 UTC||Need Help??|
Do you know what is wrong ?
You appear to be trying to embed perl into XS. I don't know of anyone ever having tried that, and I don't know why anyone *would* try that.
AFAIK, you only ever embed perl into a *C* program - and you do that only when you want to be able to run perl code in that C program.
If you want to run perl code from XS, you just do a callback to that perl code. Here is a simple Inline::C example based on an example in the perldoc perlcall documentation:
I see you've found that perlcall documentation. Note that it contains no attempts to embed a perl interpreter into the code.
(In case you're unaware of it, Inline::C and XS are essentially the same - it's just that Inline::C writes your XS file for you, then compiles the XS code and runs the script.)