使用 Qt Creator 13 Qmake 构建项目时出现 ”dependent … does not exists“ 错误
原因可能是 build 脚本中生成的 Qt 模块 include 路径和首选项中的 Default build directory 中的参数不匹配。 有两种方法可以解决这个问题,推荐使用方法二。
-
方法1
1.点击 首选项-》构建和运行-》概要。
2.取消 “使用 jom 代替 nmake”。
注:该方法会让编译项目速度变慢可能是因为 namke 不使用多线程加速编译的原因。 -
方法2
1.点击 首选项-》构建和运行-》Default Build Prperties
2.修改 Default build directory 参数。修改为以下内容:
../%{Asciify:build-%{Project:Name}-%{Kit:FileSystemName}-%{BuildConfig:Name}}
使用该配置在 Qt Creator 13 中运行时不会再出现 ”dependent … does not exists“ 错误
注:不同的 Qt Creator 版本中的 Propertie 可能有些许差异,可以根据当前使用的 Qt Creator 版本修改。