How can I make CMake use Mingw-w64 gcc/g++? [duplicate]
问题 This question already has answers here : Running CMake on Windows (2 answers) Closed 1 year ago . I am on Windwos trying to get Mingw-w64 to work with CMake since my MSVC is somehow not working at all (using Windows10 64bit. Basically I add the arguments -DCMAKE_CXX_COMPILER="C:/MinGW-w64/mingw64/bin/g++.exe" -DCMAKE_C_COMPILER="C:/MinGW-w64/mingw64/bin/gcc.exe" to my call to CMake which sets the corresponding compiler. However I get these errors: -- The C compiler identification is unknown -