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