让eclipse支持C++11特性

这篇文章是转载的,但是我实在找不到原文的链接了,原文作者可以来认领一下。

Step 1:

Project->Properties->C/C++ Build->Settings->GCC G++ Compiler->Miscellaneous->Other flags 将-c -fmessage-length=0 改为 -c -fmessage-length=0 -std=c++11

Step 2:

C/C++ General -> Paths and Symbols -> Symbols -> GNU C++. 点击 "Add..." and 在Name 中添加__GXX_EXPERIMENTAL_CXX0X__  ,"Value" 不设值,点击apply

Step 3:

C/C++ General -> Paths and Symbols -> Symbols -> GNU C++. 点击 "Add..." ,Name 写 __cplusplus, value 写 201103L,点击 apply


猜你喜欢

转载自blog.csdn.net/piaoliangjinjin/article/details/80701532