1. 编译器找不到
解决办法:在CMakeLists.txt加入如下命令
SET(CMAKE_C_COMPILER "E:/MinGW-W64/mingw64/bin/gcc.exe")#使用此代码添加gcc绝对路径
一定要写成 “gcc.exe” 而不是 "gcc",差一个.exe都会提示你 “E:/MinGW-W64/mingw64/bin/gcc is not a full path to an existing compiler tool.”
2. Make command was: "nmake"
解决办法:在执行 cmake.. 命令之前,输入如下命令:
cmake -G "MinGW Makefiles" ..
3. sh.exe was found in your PATH, here:
可以在失败的CMakeCache.txt文件里找到如下路径: