Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Inline::C and Packaged Distributions

by tlm (Prior)
on Oct 04, 2005 at 15:54 UTC ( #497305=note: print w/ replies, xml ) Need Help??


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


Comment on Re^5: Inline::C and Packaged Distributions
Download Code
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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-28 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls