0

I've noticed that with a new mingw version, I can't compile anymore with -std=c++11. It will outputs a bunch of errors, which can be "fixed" by using -std=gnu++11 ( MinGW / CxxTest bizarre errors ).

This quick hack works, but it doesn't fix the actual problem. How do I compile with c++11 flag? A lot of projects uses c++11, I don't want to change every makefiles to make it work, mingw should handle this ( in fact, It worked on my last version, before updating ).

Example code ( g++ Main.cpp -std=c++11 ):

#include <iostream>
int main()
{
    std::cout << "ok...." << std::endl;
    return 0;
}

Errors: http://pastebin.com/Zcf8Qqhn

Community
  • 1
  • 1
Aulaulz
  • 459
  • 4
  • 15
  • How about, make a man-in-the-middle executable that translates `-std=c++11` to `-std=gnu++11`? That said, you need to **include in the question** the test code, the compiler invocation verbatim, and ditto, the error messages verbatim. Voting to close as lacking reproducible example. – Cheers and hth. - Alf Sep 16 '16 at 16:10
  • There you go. However, I am 100% sure it won't help you more since there was already an example of it in the linked question. – Aulaulz Sep 16 '16 at 16:18
  • what is the output from `g++ --version`? – kfsone Sep 16 '16 at 17:29
  • g++ (GCC) 5.3.0 – Aulaulz Sep 16 '16 at 18:19

0 Answers0