suaveant,

Why don't you start here: perlxstut, and bring your C code into this framework.

Added:Also, h2xs accepts a parameter for specifying extra libraries.

h2xs [-ACOPXacdfhkmx] [-F addflags] [-M fmask] [-n module_name] [-o tm +ask] [-p prefix] [-s subs] [-v version] [headerfile [extra_libraries] +] version: 1.21 -A Omit all autoloading facilities (implies -c). -C Omit creating the Changes file, add HISTORY heading to stub P +OD. -F Additional flags for C preprocessor (used with -x). -M Mask to select C functions/macros (default is select all). -O Allow overwriting of a pre-existing extension directory. -P Omit the stub POD section. -X Omit the XS portion (implies both -c and -f). -a Generate get/set accessors for struct and union members (used + with -x). -c Omit the constant() function and specialised AUTOLOAD from th +e XS file. -d Turn on debugging messages. -f Force creation of the extension even if the C header does not + exist. -h Display this help message -k Omit 'const' attribute on function arguments (used with -x). -m Generate tied variables for access to declared variables. -n Specify a name to use for the extension (recommended). -o Regular expression for "opaque" types. -p Specify a prefix which should be removed from the Perl functi +on names. -s Create subroutines for specified macros. -v Specify a version number for this extension. -x Autogenerate XSUBs using C::Scan. -b Specify a perl version to be backwards compatibile with extra_libraries are any libraries that might be needed for loading the extension, e.g. -lm would try to link in the math library.
tinypig

In reply to Re: Getting a C library to compile into a Perl module... by tinypig
in thread Getting a C library to compile into a Perl module... by suaveant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.