Hi all.

I decided it was time to explore the Inline::C module so I copied 'n pasted this example from a web site this afternoon in an attempt to see how it worked. When I ran this code:

use Inline C; use warnings; greet('Ingy'); greet(42); __END__ __C__ void greet(char* name) { printf("Hello %s!\n", name); }

I received this error:

C:\perl>perl p1.pl File creation error File creation error File creation error Bad command or file name Bad command or file name Can't create Inline validation file C:/perl/_Inline/lib/auto/p1_pl_f75 +5/p1_pl_f7 55.inl at blib\lib\Inline.pm (autosplit into blib\lib\auto\Inline\writ +e_inl_file .al) line 849. INIT failed--call queue aborted.

Note: I couldn't 'use strict' because the author had included the line __C__ in the code. I removed it, used strict, ran the code again but the error was the same.

Any suggestions?
I have never used XS so if that is the missing step, feel free to show me ( with a small example perhaps? ) how I would do that.

Thanks in advance,

-Katie.

edited: Sun Jan 5 17:41:31 2003 by jeffa - added <readmore> tag


In reply to Inline::C error. by DigitalKitty

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.