mips64el平台编译cmake时提示 The C++ compiler does not support C++11

./bootstrap
---------------------------------------------
CMake 3.12.4, Copyright 2000-2018 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc       
C++ compiler on this system is: g++          
Makefile processor on this system is: gmake
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
gmake: “cmake”是最新的。
loading initial cache file /home/CompileSrcGit/cmake-3.12.4/Bootstrap.cmk/InitialCacheFlags.cmake
CMake Error at CMakeLists.txt:92 (message):
  The C++ compiler does not support C++11 (e.g.  std::unique_ptr).


-- Configuring incomplete, errors occurred!
See also "/home/CompileSrcGit/cmake-3.12.4/CMakeFiles/CMakeOutput.log".
See also "/home/CompileSrcGit/cmake-3.12.4/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------

解决过程:

先查询了gcc版本,这里因为我事先编译安装了gcc源码。


[root@localhost cmake-3.12.4]# gcc --version
gcc (GCC) 8.2.0
Copyright © 2018 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。

以上表明gcc没有问题,其实gcc4.8以上即可。

执行以下来解决。


[root@localhost cmake-3.12.4]# export CXXFLAGS="-std=c++11"

[root@localhost cmake-3.12.4]# ./bootstrap

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值