简体   繁体   English

Mac:服务器上的终端编译器错误

[英]Mac: Terminal Compiler Error on Server

How do I fix this?我该如何解决? I am using Terminal on a server it gives me this compiler error when I try and run.我在服务器上使用终端,当我尝试运行时,它给了我这个编译器错误。

 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.

The output from g++ is telling you exactly what you need to do to fix this. g++ 的输出准确地告诉你你需要做什么来解决这个问题。

error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x.错误此文件需要对即将推出的 ISO C++ 标准 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 或 -std=gnu++0x 编译器选项启用。

So give it what it wants:所以给它它想要的:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM