Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: perl XS - passing array to C and getting it back

by Corion (Patriarch)
on Mar 29, 2016 at 13:20 UTC ( [id://1159009]=note: print w/replies, xml ) Need Help??


in reply to Re^4: perl XS - passing array to C and getting it back
in thread perl XS - passing array to C and getting it back

The easy approach is to install and use Inline::C to generate the XS scaffolding for your code. After that, you throw away Inline::C and only use its output.

If you don't know how to install Inline::C, the easy approach is outlined in the following steps:

  1. Install local::lib (because you don't want to pollute the system Perl)
  2. Set your environment variables like local::lib proposes
  3. Download cpanm from http://cpanmin.us
  4. Run the following command:
    cpanm Inline::C

You now have Inline::C and its prerequisites installed in a local directory and can use Inline::C to generate much of the XS code for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1159009]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found