2015-11-08 61 views
-1

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

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. 

回答

0

从G ++的输出告诉你正是你需要做什么来解决这个问题是什么。

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

所以给它想要的东西:

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