Eclipse4.5.1 Mars C++11コンパイルエラー解決方法
1251 ワード
Centos 7.2 Eclipse Marsを下用する.1 C++11プロジェクトをコンパイル(GCCバージョン4.8.2)、プログラム異常は以下の通りである:/usr/include/c++4.8.2/bits/c++0 x_warning.h:32:error:#error This file requires compiler and library support for the ISO C++2011 standard.This support is is currently experimental,and must be enabled with the-std=c++11 or-std=gnu++1 compiler options.
#error This file requires compiler and library support for the\
解決策は次のとおりです.
メニュー:
#error This file requires compiler and library support for the\
解決策は次のとおりです.
メニュー:
Window
-> Preferences
-> C/C++
-> Build
-> Settings
-> Discovery
-> CDT GCC Build-in Compiler Settings
されたCommand to get compiler specsの は、${COMMAND}${FLAGS}-E-P-v-dD-std=c++11"${INPUTS}"です.
いフォントは しく された で、スペースに して、 コピーすればいいです.
クリック のプロパティ:Properties
-> C/C++ Build
-> Settings
-> Tool Settings
-> GCC C++ Compiler
== Dialect
-std=c++11
を Other dialect flags
に するか、リストからISO C++11(-std=c++0x)
を します.
: ctrl+b