ubuntu18.04安装CMake及g++

我与影子孤独终老i 提交于 2020-01-28 12:11:06

1.CMake

  • 安装
sudo apt  install cmake
  • 安装成功
    查看已安装cmake版本号。
cmake --version

在这里插入图片描述

2.g++安装

sudo apt install g++

若不安装g++,直接用cmake编译的话,会出现下面的错误。

CMake Error at CMakeLists.txt:6 (PROJECT):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake 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!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!