CMake Error: Error: generator : Unix Makefiles

使用cmake时出现下列问题

CMake Error: Error: generator : Unix Makefiles
Does not match the generator used previously: MinGW Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

原因是之前使用了其它生成器,更换生成器后,没把之前产生的相关文件删除

  1. 把原先由cmake指令产生的临时文件都删了
  2. 更换另一个目录,重新执行cmake指令

你可能感兴趣的:(C++,cmake,gcc)