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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

See the "Dynamic Linking" section of "perl -V". My first thought was that you may need to specify changes/additions to one or more of ccdlflags, cccdlflags, and lddlflags, perhaps dropping parts of what you specified to be added to CCFLAGS.

But, after several tries, I finally did find the actual error amid all of the context information:

error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unu +sed__) ^

Which sounded like a C preprocessor directive was being interpreted as C code. But then I realized that this was just more (actually helpful) context information and the location of the error was actually shown as:

perl_pl_b1a3.c:163:1: note: in expansion of macro ‘XS_EXTERNAL’ XS_EXTERNAL(boot_perl_pl_b1a3); /* prototype to pass -Wmissing-protot +ypes */ ^

Which tells me that you need to look at the line(s) before that, line 162 of perl_pl_bla3.c, where you are likely missing some terminating punctuation, like a ';'. Or you have some unclosed construct (like a comment or quoted string or such). The error could be further up from line 162, of course, and perhaps even in some other file (if line 163 is almost immediately preceeded by an #include, for example).

I didn't notice any mistakes that would explain this problem in the C code that you posted.

But I was surprised at a very specific path to your typemap definitions:

'TYPEMAPS' => [ '/home/pi/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/ExtUtils/typ +emap' ],

- tye        


In reply to Re^3: With Inline::C, how to link to external library? (;) by tye
in thread With Inline::C, how to link to external library? by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found