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

简介: 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

目录
相关文章
|
9月前
|
Unix C++
在VS2019中CMake生成出现报错
在VS2019中CMake生成出现报错
890 0
在VS2019中CMake生成出现报错
|
8月前
|
Unix
深入理解 CMake 的 `cmake --build` 命令
深入理解 CMake 的 `cmake --build` 命令
1019 1
|
9月前
|
编译器 Linux C语言
CMake指定交叉编译指南:从编译器设置到验证 (CMake Cross-compilation Guide: From Compiler Setup to Verification)
CMake指定交叉编译指南:从编译器设置到验证 (CMake Cross-compilation Guide: From Compiler Setup to Verification)
2242 1
CMake中使用vcpkg
vcpkg是一个微软开源的C++包管理器。 在以前的开发中,如果在项目中需要使用某个开源库,例如qt,我们需要取官网下载qt的源码,然后构建得到对应的库,然后在项目中链接这个库。对于自己熟悉的库还好说,若是不熟悉的库,如何拉取源码?如何构建?如何在项目中引用?等等这些问题通常会困扰我们,然而,大多数情况下,我们只是使用这个开源库,并不需要关心这个库的构建和编译等问题。如此,在以前的开发过程中,往往会花费不少的时间在引入开源库上。 vcpkg是在背景下开发出来的,通过vcpkg,我们可以在项目中很方便的引入开源库,不用再关心拉取代码、构建开源库的这些事情。 CMake构建的项目中引入开源库
221 0
|
编译器 C语言
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
506 0
CodeBlocks出现Can‘t find compiler executable in your search path for GNU GCC Compier错误
|
C语言
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
173 0
CMake教程4:最简单的CMake Library
CMake教程4:最简单的CMake Library
108 0
cmake编译出错:No CMAKE_CXX_COMPILER could be found.
cmake编译出错:No CMAKE_CXX_COMPILER could be found.
686 0
|
人工智能 虚拟化
浅谈 cxx rope
一般说的浅谈是永远不会短的  然后$qwq$本宝宝并不想讲实现原理 会用就行了呗     然后方便起见,本文规定数组$a$的第$1$位为$a[0]$ 并且本文的所有$debug$为了方便看到我们$rope$长度之后的东西,会多输出若干位(看$debug$程序就懂了) 所以一些输出可能跟我...
1435 0