也许有人可以帮我理解.为什么会出现此错误.
我正在尝试构建使用Inline :: CPP的C代码.
我正在尝试构建使用Inline :: CPP的C代码.
这是一个例子:
#!/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 ...
也许有人已经解决了类似的问题?