Cmake找不到编译器

时间:2015-04-20 11:43:54

标签: xml cmake

我正在尝试从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.

我不知道为什么会出现这个错误

1 个答案:

答案 0 :(得分:1)

如果您使用cmake-gui,则在第一次配置(=从干净目录开始)时,您可以选择编译器的完整路径。当然,现在需要安装一个编译器!所以要照顾好一个。