How can I add C++11 support to Code::Blocks compiler?

后端 未结 3 1958
慢半拍i
慢半拍i 2020-11-22 07:55

I\'m writing some code that requires to have C++11 support for my Code::Blocks 12.11. I am using default GNU GCC Compiler came with MingW. Is there any way I can do this?

3条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 09:00

    1. Go to Toolbar -> Settings -> Compiler
    2. In the Selected compiler drop-down menu, make sure GNU GCC Compiler is selected
    3. Below that, select the compiler settings tab and then the compiler flags tab underneath
    4. In the list below, make sure the box for "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" is checked
    5. Click OK to save

提交回复
热议问题