Может быть, кто-то может помочь мне понять.почему возникает эта ошибкаЯ пытаюсь построить код C ++, который использует Inline :: CPP.
Вот пример:
#!/usr/bin/env perl
package main v0.1.0;
use strict;
use warnings;
use Inline(
CPP => <<'CPP',
#undef seekdir
#include <sstream>
CPP
# ccflags => '-std=c++11',
ccflags => '-std=gnu++11',
clean_after_build => 0,
clean_build_area => 0,
);
1;
__END__
Этот код скомпилирован без ошибок под Linux, но под клубникой Perl 5.26.2 x64 выдает следующую ошибку:
"D:\devel\perl\perl\bin\perl.exe" -MExtUtils::Command -e mv -- _2_pl_0f1f.xsc _2_pl_0f1f.c
g++ -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -xc++ -c -I"D:/downloads/cpp-adaptive/cppAdaptive2/inline-src" -std=gnu++11 -s -O2 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-ID:\devel\perl\perl\lib\CORE" _2_pl_0f1f.c
In file included from _2_pl_0f1f.xs:11:0:
D:\devel\perl\perl\lib\CORE/perl.h:3544:45: error: expected ')' before '*' token
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
^
D:\devel\perl\perl\lib\CORE/perl.h:3544:45: error: expected ')' before '*' token
D:\devel\perl\perl\lib\CORE/perl.h:3544:45: error: expected ')' before '*' token
D:\devel\perl\perl\lib\CORE/perl.h:3544:45: error: expected ')' before '*' token
D:\devel\perl\perl\lib\CORE/perl.h:3544:29: error: expected ';' at end of member declaration
# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
... and so on ...
Может, кто-то уже решил подобные проблемы?