Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Regarding using SWIG+PERL

by koti688 (Sexton)
on Nov 03, 2008 at 12:53 UTC ( [id://721084]=perlquestion: print w/replies, xml ) Need Help??

koti688 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I got an simple assignment from my PM. That is as follows



1. Write C code to build a small library (may be which includes 2,3 functions like addition,subtraction ,multiplication)
2. Write Swig wrappers
3. Generate Swig interfaces for the C library
4. Update C code and build the new library
5. Create perl file to call the functions in C library..
Can U please tell me how to proceed with. If u Know anything about this please drop ur idea. anything is helpful regarding this. Thanks
Koti

Replies are listed 'Best First'.
Re: Regarding using SWIG+PERL
by jettero (Monsignor) on Nov 03, 2008 at 13:17 UTC
    I know you can use SWIG for this, and if it's a swig project that's fine. I would recommend either Inline::C or regular old XS if this is a Perl project. Out of SWIG, xs, and Inline::C, the inline route is by far the easiest option.

    (Also, although SWIG is really spelled SWIG, Perl is spelled Perl.)

    (Also Also, their tutorial seems to cover everything you need.)

    -Paul

      BTW, last time I checked, "you" was still spelled "you"... ;)

      Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

        I was referring to the Shibboleth: PERL.

        UPDATE: OIC, you were referring to the 'u' in the OP. I thought I wasn't clear or something, my bad.

        -Paul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found