1

I'm using qmake's PRECOMPILED_HEADER variable to generate a precompiled header.

If one of the precompiled header's included headers changes, the precompiled header isn't rebuilt — instead, when clang tries to use the precompiled header, it fails with fatal error: file '...' has been modified since the precompiled header was built.

How can I tell qmake to automatically recompile the precompiled header when its dependencies change?

4

2 回答 2

1

我的问题是我已经CONFIG -= depend_includepath启用了,并且我已经将预编译的标头的标头添加到INCLUDEPATH但还没有将它们添加到DEPENDPATH.

于 2014-08-25T16:45:59.460 回答
0

无论如何编辑前缀标题。例如,如果您的预编译头文件是从创建的stdafx.h,打开stdafx.h并输入一些内容,然后删除它,保存文件并再次启动构建。

于 2013-06-14T20:10:07.287 回答