Error: A CMake tool must be setup for building. Configure a CMake tool in the kit options

Error: A CMake tool must be setup for building. Configure a CMake tool in the kit options

在使用 QT Creator 时,出现此错误。我真的很感激能帮助我理解这个错误,因为我已经在 QT 创建者中设置了 CMake 工具,但它可能找不到它。这是错误:

A CMake tool must be setup for building. Configure a CMake tool in the kit options

以下是有关我的环境的一些详细信息:

请让我知道您还需要什么信息,我将相应地编辑问题。

QT Creator bug thread 中详细记录了此错误,似乎会影响 QT Creator 4.3.0 至 4.10 版。线程列表中的几个帖子解决了这个问题,包括简单地重新启动 QT Creator。线程中的其他人建议使用以下解决方法来避免错误:

  • 外部 编辑器(在 QT Creator 之外)编辑您的 CMake 文件
  • 然后,运行 来自 QT Creator 的 CMake

如果您希望完全删除错误,已在 QT Creator 4.11 中实施修复。