使用英特尔编译器构建 Qt 4 = 未解决的错误
我试图使用英特尔并行工作室编译器构建 Qt 4.7.2,我注意到与 vcc 不同,它失败并显示错误消息:
灾难性错误:无法打开预编译头文件“qmake_pch.pchi”
谷歌搜索该消息返回一个链接:https://bugreports.qt.io/browse/QTBUG-15390
它说问题是目前尚未解决,但提到了解决方法:
要解决这个问题,需要设置 Makefile 中的 CFLAGS 以创建它自己的 pch 文件,例如:
CFLAGS = -Yc -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)
但是,将这些行添加到 win32-icc qmake 配置中对我没有任何作用。
有什么想法吗?
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 workaround:
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
预编译头是一种构建优化。如果它们引起问题,只需构建没有它们的 Qt。无论如何,如果您不致力于 Qt 本身,那么它就是一次性构建。
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.
调用configure运行qmake,并且qmake在发生灾难性错误之前在源树的“qmake”文件夹下生成一个Makefile。您需要编辑该文件而不是编辑 qmake 配置文件。 搜索该
在“qmake/Makefile”中
行并将其更改为现在使用资源管理器将编辑的 Makefile 设为只读!然后再打电话
!配置脚本将尝试覆盖 Makefile 但不会成功。现在 Makefile 就是我们想要的样子,配置过程也将完成。
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
line in the "qmake/Makefile" and change it to
Now make the edited Makefile read-only using explorer! Then call the
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.