cmake编译出错:No CMAKE_CXX_COMPILER could be found.
温馨提示:这篇文章已超过592天没有更新,请注意相关的内容是否还可用!
在ubuntu系统上运行cmake编译时出错报错命令如下
-- The cxx compiler identification is unknown CMake Error at CMakeLists.txt:12 (project) : No CMAKE_CXX_COMPILER could be found. Tell CNake where to find the compiler by setting either the environment variable "Cxx" or the CNake cache entry'CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. -- Configuring incomplete,errors occurred !
解决办法
sudo apt install -y build-essential
build-essential有什么作用
Ubuntu缺省情况下,并没有提供C/C++的编译环境,因此还需要手动安装。但是如果单独安装gcc以及g++比较麻烦,所以Ubuntu提供了一个build-essential软件包,他集成了gcc以及g++所需要的环境
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作有参考学习价值
喜欢请点击上方【分享】,如果对您有帮助可点击上方【打赏】打赏本站。谢谢大家对阿豪运维笔记的支持。