开发者

Building Qt 4 with intel compiler = unresolved bug

I was trying to build Qt 4.7.2 with intel parallel studio compiler and I noticed unlike the vcc it fails with an error message:

Catastrophic error: cannot open precompiled header file "qmake_pch.pchi"

Googling the message returned one single link: https://bugreports.qt.io/browse/QTBUG-15390

It says the issue is currently unresolved but mentions a wo开发者_Python百科rkaround:

To workaround it then the CFLAGS in the Makefile need to be set to create it's own pch file like:

CFLAGS = -Yc -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)

However, adding those lines to the win32-icc qmake configuration didn't do anything for me.

Any ideas?


Precompiled headers are a build optimization. If they cause issues, just build Qt without them. It's a one-time build anyway, if you're not working on Qt itself.


Calling configure runs qmake and qmake produces a Makefile under "qmake" folder of the source tree just before catastrophic error. You need to edit that file instead of editing the qmake configuration file. Search for the

CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)

line in the "qmake/Makefile" and change it to

CFLAGS = -Yc -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)

Now make the edited Makefile read-only using explorer! Then call the

configure -platform win32-icc

again! The configure script will try to overwrite Makefile but will not succeed. Now the Makefile is how we want and the configuration process will complete.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜