http://www.perlmonks.org?node_id=497305


in reply to Re^4: Inline::C and Packaged Distributions
in thread Inline::C and Packaged Distributions

My problem is that, for reasons I don't yet understand, my Inline::C does not generate *.xs files.

% rm -rf _Inline % cat hello.pl use Inline C => 'void hello(){printf("Hello, world\n\n");}'; hello; __END__ % perl hello.pl Hello, world % tree . . |-- _Inline | |-- build | |-- config | `-- lib | `-- auto | `-- hello_pl_45c9 | |-- hello_pl_45c9.bs | |-- hello_pl_45c9.inl | `-- hello_pl_45c9.so `-- hello.pl

As you can see, no *.xs file is created. What is missing from the code?

the lowliest monk

Replies are listed 'Best First'.
Re^6: Inline::C and Packaged Distributions
by demerphq (Chancellor) on Oct 04, 2005 at 16:06 UTC

    Ahm, shoot. My apologies. You need to enable the option that tells Inline not to clean up after itself. I think you want something like

    use Inline Config => ENABLE => FORCE_BUILD, DISABLE => CLEAN_AFTER_BUILD;

    or the equivelent

    use Inline Config => FORCE_BUILD => 1, CLEAN_AFTER_BUILD => 0;

    IIRC, this should come before you say

    use Inline::C;

    BTW, I assure you that Inline::C does indeed produce XS. :-) In fact thats exactly what Inline::C does for you: autogenerate XS bindings for the C routines you provide.

    ---
    $world=~s/war/peace/g