使用 MinGW 时,CMAKE 需要哪个 .exe 文件作为 CMAKE_C_COMPILER 和 CMAKE_CXX_COMPILER 参数?

问题描述 投票:0回答:1

我找不到 CMAKE_C_COMPILER 和 CMAKE_CXX_COMPILER 需要哪些值。 我使用 CMake 3.31.3

CMake-gui 错误:

The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:38 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:38 (project):
  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.


Configuring incomplete, errors occurred!```
c++ cmake mingw cmake-gui
1个回答
0
投票

gcc.exe
对于 CMAKE_C_COMPILER 和
g++.exe
对于 CMAKE_CXX_COMPILER

© www.soinside.com 2019 - 2024. All rights reserved.