c++ - Mac : Terminal Compiler Error on Server

标签 c++ terminal compiler-errors server

我该如何解决?我在服务器上使用终端时,尝试运行时会出现此编译器错误。

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.

最佳答案

g++的输出告诉,您需要做什么才能解决此问题。

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.



所以给它想要的东西:
g++ -std=c++0x characters.cpp

关于c++ - Mac : Terminal Compiler Error on Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33590012/

相关文章:

c++ - 在 boost asio 中处理未处理的异常并重新启动处理的正确方法

node.js - 关闭并重新打开终端后如何访问正在运行的nodemon脚本?

terminal - 使用fish shell时显示不正确

c++ - 我没有得到运算符重载

c++ - 消除变量的 const 拷贝

java - 如何在 Mac 上使用终端从 Eclipse 编译 Java 程序

c++ - 在带有 XCode 的 OpenCV 中使用 Featured2D 构建错误

compiler-errors - 在移植到 ARM 期间使用指针访问数组不起作用

c++ - 非法引用非静态成员 'Sun::m_SunTexture'

c++ - MSVC 和 gcc 之间的调用约定