【问题标题】:c++0x_warning.h:31:2: error:c++0x_warning.h:31:2: 错误:
【发布时间】:2012-10-06 17:34:57
【问题描述】:

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

/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 中使用了它,但没有用。

谢谢, 阿迪

【问题讨论】:

  • 删除行首的#

标签: ubuntu g++


【解决方案1】:

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

【讨论】:

  • Razeh,我只是在注释掉这一行后复制到这里。不过谢谢。
【解决方案2】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-21
    • 2018-06-07
    • 2016-05-09
    • 1970-01-01
    • 2021-08-22
    • 2017-07-08
    • 2016-10-01
    • 1970-01-01
    相关资源
    最近更新 更多