c++0x_warning.h:31:2: error:

人盡茶涼 提交于 2019-12-23 16:34:40

问题


I was trying make a file and got this error. I am a newbie. Can any one help me here.

/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: error: #error This
file requires compiler and library support for the upcoming ISO C++
standard, C++0x. This support is currently experimental, and must be
enabled with the -std=c++0x or -std=gnu++0x compiler options.

How to enable with -std=c++0x? I used this in my makefile #CXX_VERSION_FLAG = -std=c++0x but did not work.

Thanks, Addy


回答1:


No, just pass these flags (aka options) to the compiler. Instead of running gcc ..., run gcc -std=c++0x ... (or -std=c++11 for newer compilers).




回答2:


Lines in Makefiles that start with '#' are comment lines. Try removing the '#'.



来源:https://stackoverflow.com/questions/12762155/c0x-warning-h312-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!