【发布时间】:2011-08-01 00:33:47
【问题描述】:
我正在尝试构建 Qt,因为它是 Visual Studio 2010 所必需的。构建脚本 (configure.exe) 非常简单,但默认情况下编译需要很长时间。在带 SSD 的快速笔记本上等了一个小时后,我放弃了(不使用任何标志,只使用 configure.exe)。
对于基本的轻量级 Qt 应用程序,推荐的标志是什么?我的意思是对于学习 Qt 的人,不需要WebKit 等等。
我收集了我发现的最有用的链接:
Qt配置参考页面:http://doc.qt.io/qt-4.8/configure-options.html
Ben 对此问题的建议:Building Qt 4.5 with Visual C++ 2010
-no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast
Rubenvb 对此问题的建议:How to compile Qt as static
- 禁用调试:
-release- 禁用不需要的模块,尤其是 QtWebKit:
-no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples- 禁用 LTCG 支持,这会产生巨大的副作用 静态库:
no-ltcg
【问题讨论】:
-
@Peter 我在配置中找不到
no-ltcg标志,我在 Qt 4.7.4 上对此进行了测试。
标签: visual-studio-2010 qt build makefile configure