O Monks, please hear my question.

This concerns the distribution Audio::TagLib and the xs files therein, which interface to the C++ taglib library.

In one of the .xs files, some of the functions that are declared suffer from the (infamous?) error:

Can't locate object method "header" via package "Audio::TagLib::Tag"

Here's a snip of the .xs file. isEmpty() is recognized, header() and the functions that follow it in the file are not.

bool TagLib::ID3v2::Tag::isEmpty() CODE: RETVAL = THIS->isEmpty(); OUTPUT: RETVAL void TagLib::ID3v2::Tag::header() PREINIT: TagLib::ID3v2::Header * h; PPCODE: h = THIS->header(); ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Audio::TagLib::ID3v2::Header", (void *)h); SvREADONLY_on(SvRV(ST(0))); XSRETURN(1);

Applying nm(1) to the .so file suggests that header() should be located.

t _ZL36XS_Audio__TagLib__ID3v2__Tag_isEmptyP11interpreterP2cv t _ZL35XS_Audio__TagLib__ID3v2__Tag_headerP11interpreterP2cv

Everything in this particular .xs that follows isEmpty() suffers the same fate. However, in the .c file compiled from the .xs files (there are quite a few), other functions from other .xs files do not duffer the same fate.

Insight would be welcome.


In reply to Some functions in .xs file can't be found by geoffleach

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.