系统环境:Ubuntu 22.04.1
1. 问题发生
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:4 (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!
See also "/home/echo/Desktop/njord/gdal-3.7.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/echo/Desktop/njord/gdal-3.7.0/build/CMakeFiles/CMakeError.log".
2. 解决方法
执行如下命令,即安装 build-essential
sudo apt-get update && sudo apt-get install build-essential
标签:CMakeLists,CMAKE,CMake,--,CXX,found,Detecting,COMPILER,compiler
From: https://www.cnblogs.com/echohye/p/17579310.html