我在 Windwos 上试图让 Mingw-w64 与 CMake 一起工作,因为我的 MSVC 不知何故根本无法工作(使用 Windows10 64bit.
基本上我将参数添加-DCMAKE_CXX_COMPILER="C:/MinGW-w64/mingw64/bin/g++.exe" -DCMAKE_C_COMPILER="C:/MinGW-w64/mingw64/bin/gcc.exe"到我对设置相应编译器的 CMake 的调用中。
但是我收到这些错误:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: C:/MinGW-w64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/MinGW-w64/mingw64/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/MinGW-w64/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
Run Code Online (Sandbox Code Playgroud)
我怎么能让这个工作?