推荐标志一个简约的Qt构建 [英] Recommended flags for a minimalistic Qt build

查看:112
本文介绍了推荐标志一个简约的Qt构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,因为它需要Visual Studio 2010中构建脚本(configure.exe)来构建Qt是相当简单的,但默认情况下它需要年龄编译。与SSD等了一个小时在快速的笔记本电脑后,我已经放弃了(使用任何标志,只是configure.exe)。

什么是一个基本的,轻量级的Qt应用程序推荐的标志?我的意思是有人学习Qt的,谁也不需要 WebKit的等。

我收集的最有用的链接我发现:

有关Qt的配置参考页: http://doc.qt.io /qt-4.8/configure-options.html

从这个问题本的建议是:构建Qt 4.5用Visual C ++ 2010


  

-no-webkit的-no声子 - 无 - 声子后端-no脚本-no-scripttools -no多媒体-no-qt3support -fast


从这个问题Rubenvb的建议是:如何编译Qt的静态


  

      
  1. 禁用调试: -release

  2.   
  3. 您不需要禁用模块,尤其是QtWebKit的: -no-的WebKit
      -no脚本-no-scripttools -no-qt3support -nomake演示-nomake工具-nomake例子

  4.   
  5. 禁用LTCG的支持,其中有大量产生的讨厌的副作用
      静态库:无LTCG

  6.   


解决方案

这应该没问题。一切都超出了WebKit是刚刚微优化,如果涉及到建立时间(WebKit是巨大的)。当你想探索的Qt我不会设置-nomake工具,你可能需要使用这些工具。

I am trying to build Qt because it is required for Visual Studio 2010. The build script (configure.exe) is quite straightforward but by default it takes ages to compile. After waiting for an hour on a fast notebook with an SSD, I've given up (using no flags, just configure.exe).

What are the recommended flags for a basic, lightweight Qt application? I mean for someone learning Qt, who doesn't need WebKit and so on.

I've collected the most useful links I found:

The reference page for Qt configure: http://doc.qt.io/qt-4.8/configure-options.html

Ben's advice from this question: 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's advice from this question: How to compile Qt as static

  1. Disable debug: -release
  2. Disable modules you don't need, especially QtWebKit: -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
  3. Disable LTCG support, which has the nasty side effect of generating huge static libraries: no-ltcg

解决方案

That should be ok. Everything beyond webkit is just micro-optimization, if it comes to build times (webkit is huge). I wouldn't set -nomake tools when you want to explore Qt, as you might want to use those tools.

这篇关于推荐标志一个简约的Qt构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆