Hey, maybe somebody can help me to understand. why this error occurs.
I am trying to build C++ code, that use <sstream> using Inline::CPP.

Here is the example:

    #!/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__

This code compiled without errors under linux, but under strawberry perl
5.26.2 x64 it produce following error:

    "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 ...

Maybe somebody already solved similar problems?

Reply via email to