我该如何解决?我在服务器上使用终端时,尝试运行时会出现此编译器错误。
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/