CMake找不到编译器 [英] Cmake cannot find compiler

查看:798
本文介绍了CMake找不到编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从gcc-xml软件的源代码生成二进制文件,但是当我使用Cmake时出现此错误:

I am trying to generate binaries from the source code of the gcc-xml software but when I use Cmake I have this error:

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.

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

I don't know why I have this error

推荐答案

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

If you use cmake-gui, at the first configuration (=start from a clean directory) you have the option to select the full path to your compiler. Now, of course, you need a compiler installed! So take care of having one.

这篇关于CMake找不到编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆