Cmake 找不到编译器
Cmake cannot find compiler
我正在尝试从 gcc-xml 软件的源代码生成二进制文件,但是当我使用 Cmake 时出现此错误:
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error in :
No CMAKE_C_COMPILER could be found.
CMake Error in :
No CMAKE_CXX_COMPILER could be found.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.2)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
我不知道为什么会出现这个错误
如果您使用 cmake-gui,在第一次配置时(=从一个干净的目录开始)您可以选择 select 编译器的完整路径。现在,当然,您需要安装一个编译器!所以保重拥有一个。
我正在尝试从 gcc-xml 软件的源代码生成二进制文件,但是当我使用 Cmake 时出现此错误:
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error in :
No CMAKE_C_COMPILER could be found.
CMake Error in :
No CMAKE_CXX_COMPILER could be found.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.2)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
我不知道为什么会出现这个错误
如果您使用 cmake-gui,在第一次配置时(=从一个干净的目录开始)您可以选择 select 编译器的完整路径。现在,当然,您需要安装一个编译器!所以保重拥有一个。