G++ updated on MingW gets massive error messages

后端 未结 5 1155
囚心锁ツ
囚心锁ツ 2020-12-06 19:09

I\'m on Windows 10 with MinGW, and recently updated my g++, using mingw-get update and mingw-get upgrade. This error occurred, even af

相关标签:
5条回答
  • 2020-12-06 19:36

    I still have not found a solution. The above did not work for me. For now, I'm using visual studios compile via command line cl /EHsc somefile.cpp. Here is a reference, https://msdn.microsoft.com/en-us/library/ms235639.aspx.

    0 讨论(0)
  • 2020-12-06 19:40

    In Clion

    • go to CMakeList.txt, this document is next to main.cpp and
    • change -std=c++11 with -std=gnu++11
    0 讨论(0)
  • 2020-12-06 19:44

    Thanks to @SilencePhil, I found a relevant StackOverflow answer. This question is not the same question, but has the same solution, namely to replace std=c++11 with std=gnu++11 in the call to g++.

    0 讨论(0)
  • 2020-12-06 19:45

    The accepted answer is hardly a solution. Having to set the C++ standard version should not be required.

    I strongly suggest you try the MinGW-w64 GCC, which does not have this problem (or at least I haven't seen it reported or experienced it myself).

    0 讨论(0)
  • 2020-12-06 19:50

    If you are working inside CODE::BLOCKS go to Settings->Compiler. Select 'compiler settings with GNU GCC compiler' under Selected Compiler. Check the option "Have g++ follow the C++14 ISO C++ language standard [-std=c++14]" in General menu.

    0 讨论(0)
提交回复
热议问题