
c++11 std::unique_ptr error cmake 3.11.3 bootstrap
发布日期:2021-05-06 19:48:20
浏览次数:15
分类:技术文章
本文共 2180 字,大约阅读时间需要 7 分钟。
c++11 std::unique_ptr error cmake 3.11.3 bootstrap
前言
這是筆者在VirtualBox裡的Ubuntu 16.04下按照安裝cmake時,其中一步./bootstrap
所報的錯。
錯誤訊息
節錄部份錯誤訊息如下:
---------------------------------------------CMake 3.16.5, Copyright 2000-2019 Kitware, Inc. and ContributorsC compiler on this system is: cc C++ compiler on this system is: /usr/bin/g++ -std=gnu++1z Makefile processor on this system is: make/usr/bin/g++ has setenv/usr/bin/g++ has unsetenv/usr/bin/g++ does not have environ in stdlib.h/usr/bin/g++ has stl wstring/usr/bin/g++ has---------------------------------------------//many lines...CMake Error at CMakeLists.txt:107 (message): The C++ compiler does not support C++11 (e.g. std::unique_ptr).-- Configuring incomplete, errors occurred!See also "/home/ubt/Documents/implementation/cmake-3.16.5/CMakeFiles/CMakeOutput.log".See also "/home/ubt/Documents/implementation/cmake-3.16.5/CMakeFiles/CMakeError.log".---------------------------------------------Error when bootstrapping CMake:Problem while running initial CMake---------------------------------------------
解決辦法
這個錯誤的原因是cmake的根目錄被放在一個mounted directory之下,因此解決方法就是把cmake根目錄移到其它非mounted directory下,然後重新執行./bootstrap
即可。
過程中可能出現以下錯誤:
CMake Error: The current CMakeCache.txt directory /home/ubt/cmake-3.16.5/CMakeCache.txt is different than the directory /home/ubt/Documents/implementation/cmake-3.16.5 where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt---------------------------------------------Error when bootstrapping CMake:Problem while running initial CMake---------------------------------------------
這時候要先下:
rm -r CMakeCache.txt CMakeFiles/ Bootstrap.cmk/
來刪除前次./bootstrap
所生成的檔案,接著再重新執行./bootstrap
。
以下是成功執行的輸出:
---------------------------------------------CMake 3.16.5, Copyright 2000-2019 Kitware, Inc. and ContributorsFound GNU toolchainC compiler on this system is: gcc C++ compiler on this system is: g++ -std=gnu++17 Makefile processor on this system is: makeg++ has setenvg++ has unsetenvg++ does not have environ in stdlib.hg++ has stl wstringg++ has---------------------------------------------
參考連結
发表评论
最新留言
逛到本站,mark一下
[***.202.152.39]2025年03月18日 11时09分03秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
3D感知技术及实践
2019-03-04
北大读博手记:怎样完成自己的博士生涯?非常具有指导性!
2019-03-04
世界上有哪些代码量很少,但很牛逼很经典的算法或项目案例?
2019-03-04
基于OpenCV实战:对象跟踪
2019-03-04
干货|python基础知识总结
2019-03-04
RegExp正则表达式-基本语法
2019-03-04
JavaScript 性能优化-防抖和节流
2019-03-04
属性闭包求解算法——数据库考试复习
2019-03-04
砍树问题(二分法)
2019-03-04
poj3260The Fewest Coins
2019-03-04
poj3617
2019-03-04
poj3069
2019-03-04
Java洛谷P5461 赦免战俘讲解
2019-03-04
关于 form表单 嵌套问题的解决方案
2019-03-04
论转发与重定向参数传递问题(jsp+servlet项目开发遇到的问题)
2019-03-04
Android—— log.e(),log.d(),log.i()等的区别
2019-03-04
js中时间戳转时间格式
2019-03-04
位运算
2019-03-04