cmake编译出错:No CMAKE_CXX_COMPILER could be found.

错误类似:

-- The CXX compiler identification is unknown
-- The C compiler identification is GNU 8.3.0
CMake Error at CMakeLists.txt:99 (enable_language):
  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.

解决办法:

sudo apt install -y build-essential

 

cmake编译出错:No CMAKE_CXX_COMPILER could be found.cmake编译出错:No CMAKE_CXX_COMPILER could be found. 柳鲲鹏 发布了2358 篇原创文章 · 获赞 287 · 访问量 166万+ 他的留言板 关注
上一篇:运维工程师被墨菲定律的各种打脸之CXX问题


下一篇:在 linux 下使用 CMake 构建应用程序