码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2018-10-25 14:16:22      阅读:1438      评论:0      收藏:0      [点我收藏+]

标签:err   解决   选项   erro   有关   efi   ubunt   standard   stand   

问题

在编译时出现如下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 不支持的解决办法

标签:err   解决   选项   erro   有关   efi   ubunt   standard   stand   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!