首页 > 编程语言 > 详细

Ubuntu 编译出现 ISO C++ 2011 不支持的解决办法

时间:2018-10-25 13:50:51      阅读:247      评论:0      收藏:0      [点我收藏+]

问题

在编译时出现如下error:

error:This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

原因

编译的时候未开启 ISO C++ 2011 的支持选项,无法支持 ISO C++ 11 的有关语法

解决办法

修改MakeFile,在其中的

g++ -o test test.cpp

加上一行 -std=c++11,变成

g++ -std=c++11 -o test test.cpp

即可编译成功

Ubuntu 编译出现 ISO C++ 2011 不支持的解决办法

原文:https://www.cnblogs.com/vancasola/p/9849024.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!