You can't just access the functions in ae_util.so as simply as that. Normally you would write an Inline::CPP function that accesses (or just wraps) the ae_util.so function - and you would call that accessor/wrapper function from your perl code.

In 'perldoc Inline::C-Cookbook' you'll find a simple example that achieves this wrt a Win32 dll (which is the Win32 equivalent of a '.so'). Look for the string 'Just Desserts' (minus the quotes) in that documentation. The aim of that exercise is to call user32.dll's MessageBoxA() function - which is wrapped by the Winbox() function. You can see that it's the WinBox() function that gets called from perl, not the MessageBoxA() function.

If you go back up through that documentation you'll find a section headed 'Automatic Function Wrappers' which mentions Inline::C's 'autowrap' capability. That capability may also extend to Inline::CPP ... I don't know - I've not even used it in an Inline::C environment.

In fact it wouldn't hurt to have a good look right through the Inline::C Cookbook, as there's likely other useful stuff there for you.

Sorry - I don't have anything specific to Inline::CPP. I'm not very familiar with either it or C++. Peruse its documentation (there's lots of examples and other info in 'perldoc Inline::CPP') and the test scripts that came with the source - you may well find something helpful there.

Also, if you want to call the 'new' method, I expect you'll have to provide that method.

Cheers,
Rob

In reply to Re: how use the Inline::CPP module with a custom library by syphilis
in thread how use the Inline::CPP module with a custom library by earlati2

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.