【发布时间】:2015-06-27 02:57:33
【问题描述】:
我正在尝试从 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.
我不知道为什么会出现这个错误
【问题讨论】:
-
您是否安装了 C 编译器并在 PATH 上?
-
这就是我的意思:在 Cmake 上,他们问我想要什么生成器,我说:Visual Studio 6。但我不知道它是否安装在我的计算机上,因为当我输入 Visual Studio 6 在我的资源管理器上什么都没有。我可以使用哪个 C 编译器?我需要一个 c++11 编译器?
-
为您拥有的编译器选择生成器。你已经标记了这个
gcc,所以我假设你正在使用它。如果您使用的是 Unix 或 Cygwin,请使用“Unix Makefiles”生成器。如果你在 MSYS 上,也有一个生成器。 -
不,我在 windows 上,我在标记 gcc 时犯了一个错误。我在 Windows 7 上