错误:unrecognized command line option “-std=c++11”
From: http://my.oschina.net/chenyoca/blog/226455
目录[-]
- 添加源(Ubuntu)
- 安装4.8版本
- 查看本地安装版本
- 切换版本
- 再次查看g++版本
出现这个编译错误的原因在g++ gcc 版本不够高。
添加源(Ubuntu)
1
2
|
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
|
安装4.8版本
1
|
$ sudo apt-get install gcc- 4.8 g++- 4.8
|
查看本地安装版本
1
2
3
|
$ ls -lh /usr/bin/g++*
这里应该可以看到本机安装了 4.6 和 4.8 两个版本。
|
切换版本
1
2
3
4
5
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc- 4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++- 4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc- 4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++- 4.8
sudo update-alternatives --config gcc
**选择 4.8 版本的序号**
|
再次查看g++版本
1
2
3
|
g++ --version
确认为 4.8 版本。
|
参考1:http://www.cocos2d-x.org/forums/6/topics/37467?r=37788#message-37788
参考2:http://blog.csdn.net/riverweed/article/details/21329211
错误:unrecognized command line option “-std=c++11”相关推荐
- linux 升级g++ [错误:unrecognized command line option “-std=c++11”]
出现这个编译错误的原因在g++ gcc 版本不够高. 添加源(Ubuntu) 1 2 $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test $ s ...
- NVIDIA/Apex安装时遇到 C++编译:unrecognized command line option ‘-std=c++14’ 错误解决
0.问题 编译安装apex的时候,报错C++编译:unrecognized command line option '-std=c++14',后面紧跟着ninja也没有编译成功.发现是编译器版本太老( ...
- Fairseq 编译setup.py 报错“unrecognized command line option ‘-std=c++14“
问题原因:当前版本g++, gcc, c++,需要升级: 系统CentOS7 默认g++, gcc, c++均为4.8.5版本的: 升级方法如下: https://blog.csdn.net/chen ...
- suse12中pip install xxx报错gcc: error: unrecognized command line option ‘-fstack-clash-protection’
我们在Linux中安装某些python的第三方包时,有时候需要gcc来进行协助编译安装(例如psutil.pycrypto等) 1.很不幸,最近在suse12中用pip install psutil时 ...
- 【问题解决方案】cc1plus: error: unrecognized command line option ‘-fdump-class-hierarchy’
博主个人站点: http://azmddy.top 原文链接:[问题解决方案]cc1plus: error: unrecognized command line option '-fdump-clas ...
- 编译arm-linux驱动时报错:“unrecognized command line option ‘-fstack-protector-strong’”
前两年买了个树莓派3B+,之后参照网上的一些教程做了个视频小车,玩了几天之后就放起来了.这阵子突然想研究一下arm-linux的驱动是怎么编写的. 参照其他人的博客,下载了源码"linux- ...
- error: unrecognized command line option '-fstack-protector-strong'解决办法
原文地址:https://blog.csdn.net/u014134262/article/details/50402928 今天编译kernel 的时候,报error: unrecognized c ...
- cc1plus.exe: error: unrecognized command line option -fno-keep-inline-dllexport
在Windows环境下的控制台上,通过qmake指令编译Qt程序时,出现 cc1plus.exe: error: unrecognized command line option "-fno ...
- 报错安装c++ error unrecognized command line option ‘ -mno-avx512vbmi
arangodb 安装出错 c++ error unrecognized command line option ' -mno-avx512vbmi c++未安装 压缩包安装 1.下载gcc压缩包 ...
最新文章
- 团队开发中的 Git 实践
- 8636 跳格子(dfs+记忆化搜索)
- python垃圾回收 (GC) 机制
- x210-II WinCE启动10s,还可继续优化
- vb.net利用SerialPort进行读取串口操作
- nginx多端口配置php,nginx服务器使用不同端口配置多个网站站点
- eclipse显示行号和Tab、空格、回车
- Android闪退日志关键字,求助,简单UI界面,调试总是闪退,还没有LOG错误日志???...
- Redis08-事件
- gson 获取hasmap_GSON fromJson return LinkedHashMap instead of EnumMap
- python软件如何下载-python软件怎么样?实际的操作方法来了
- linux yum 命令 详解
- java treemarker_Java TreeMaker類代碼示例
- 《程序员修炼之道》笔记(五)
- 使用MATLAB的trainNetwork设计一个简单的LSTM神经网络
- Linux常用命令学习-base64
- Spring cloud alibaba--Feign微服务调用组件
- Linux 的磁盘挂载 | 详解
- 分布式事务框架lcn入门demo
- Linux系统笔记本合盖黑屏与休眠的问题