I saw your question on the mailing list and it was bugging me that no one bothered to answer it. Of course, since I've joined the mailing list, your's is the only post that I've seen :(

On the mailing list code, you're not having a problem. With this code, you've calling a sub you haven't declared :) - my_create_context versus create_context. Of course, since it's obvious you're still massaging it, this is not the problem. From what you are saying, the problem lies here:

/* This is the call that is failing */ status = ivadmin_context_createdefault(user,passwd,&ctx,&rsp);

How do you know this is where the error is? You don't supply us with any error message. Also, and I know this sounds too elementary, have you printed all of the values before and after the "createdefault" call?

(Entering deep waters here) I'm also wondering about the typedefs for ivadmin_context and ivadmin_response. Do you need to specify new typemaps for them? I thought this was only an issue when declaring return types, but I could be wrong. Do you have anyway of verifying that Perl is handling these correctly?

Cheers,
Ovid

Update: You mentioned on the mailing list that you're using the same compiler as when you compiled Perl. Are you using the same 'make' utility? An article at http://www.perl.com/ by the Inline author suggests that this will cause problems (though he does not elaborate).

I'd also try the following one-liner:

perl -MInline=Info,force,NoClean yourcode.pl

That forces Information about bound subs to be printed to STDERR. It also forces a recompile and leaves the build directories intact so you can browse through them for more information.

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to (Ovid) Re: Inline::C code doesn't work, but the C code does by Ovid
in thread Inline::C code doesn't work, but the C code does by mikfire

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.