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!