develooper Front page | perl.xs | Postings from February 2012

Fwd: Invalid use of 'static' in linkage specification

Thread Previous | Thread Next
From:
David Oswald
Date:
February 22, 2012 22:26
Subject:
Fwd: Invalid use of 'static' in linkage specification
Message ID:
CAKTcQ96wGZpu7WWCNkeNciNK_RBCq7AdXy0acU2Qea75=WMJ6A@mail.gmail.com
Alberto (or anyone else):

Have you made any progress on this issue?  I'm seeing the same problem
in a couple of smoke test failures on Inline::CPP v0.34_002 dev.

Here's an example:

http://www.cpantesters.org/cpan/report/35702916-59fc-11e1-8417-42773f40e7b5

I look at the .c output from Inline::CPP (take the t/01basic.t test, for
example) and see one clue.  The segment:

#ifdef __cplusplus
extern "C"
#endif


I'm thinking that one resolution might be to use the newer syntax:

#ifdef __cplusplus
extern "C" {    // Note the new block.
#endif

/* fast forward to the bottom of the file */

#ifdef __cplusplus
}               // Close the block.
#endif

...that's only a hunch; I can't grasp how get ExtUtils::ParseXS to do
that for me, so I haven't been able to try it out.

At any rate, same error message you're getting, so that at least helps
me to realize I should be looking outside of Inline::CPP and Inline::C
for an answer.

Dave

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About