Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: strawberry perl + Inline::CPP + <sstream> compilation error

by syphilis (Archbishop)
on Jun 04, 2018 at 00:49 UTC ( [id://1215799]=note: print w/replies, xml ) Need Help??


in reply to strawberry perl + Inline::CPP + <sstream> compilation error

Maybe somebody already solved similar problems?

Or maybe not ?
The failing script can be reduced to:
use strict; use warnings; use Inline CPP => <<'CPP'; #include <sstream> CPP 1;
which (I think) still produces the same errors.

This would suggest that there's some fundamental incompatibility between perl.h and the sstream header with mingw-w64 compilers.
But it's not clear to me just what that incompatibility is. (We might need someone with some C++ insights to chime in.)

Do you really need to include sstream ?

UPDATE: For those interested, the original post has been cross-posted to stackoverflow.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: strawberry perl + Inline::CPP + <sstream> compilation error
by zdm (Beadle) on Jun 04, 2018 at 02:15 UTC
    <sstream> is used by dlib (dlib.net). I am using dlib in my project.
      <sstream> is used by dlib (dlib.net). I am using dlib in my project

      I guess that means you'll need sstream ;-)

      There's a reply on stackoverflow that indicates that the problem is that one of the standard perl headers defines "setbuf".
      I find that the following compiles ok for me:
      use strict; use warnings; use Inline CPP => <<'CPP'; #undef seekdir #ifdef _WIN32 #undef setbuf #endif #include <sstream> CPP 1;
      So see how that works for you.

      Cheers,
      Rob
        The problem is solved. <code> #undef setbuf #undef wait </cpan> Thank you very much!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1215799]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found