【问题标题】:Mac: Terminal Compiler Error on ServerMac:服务器上的终端编译器错误
【发布时间】:2016-02-08 23:17:49
【问题描述】:

我该如何解决这个问题?我在服务器上使用终端,当我尝试运行时它给了我这个编译器错误。

flip2 ~/Assignment3 8% g++ characters.cpp
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/random:35,
                 from characters.cpp:3:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/c++0x_warning.h:31: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.

【问题讨论】:

    标签: c++ terminal compiler-errors server


    【解决方案1】:

    g++ 的输出准确地告诉您您需要做什么来解决这个问题。

    错误 此文件需要编译器和库支持即将推出的 ISO C++ 标准 C++0x。目前该支持 实验性的,必须使用 -std=c++0x 或 -std=gnu++0x 启用 编译器选项。

    所以给它想要的东西:

    g++ -std=c++0x characters.cpp
    

    【讨论】:

      猜你喜欢
      • 2017-06-09
      • 2017-09-30
      • 2015-07-27
      • 2016-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-30
      • 1970-01-01
      相关资源
      最近更新 更多