4

我正在尝试制作文件并收到此错误。我是新手。有人能帮我一下吗。

/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.

如何启用-std=c++0x?我在我的makefile中使用了它,#CXX_VERSION_FLAG = -std=c++0x但没有用。

谢谢,阿迪

4

2 回答 2

2

不,只需将这些标志(又名选项)传递给编译器。而不是运行gcc ...,运行gcc -std=c++0x ...(或-std=c++11用于较新的编译器)。

于 2012-10-06T17:37:30.380 回答
1

Makefile 中以“#”开头的行是注释行。尝试删除“#”。

于 2012-10-06T17:37:51.143 回答