Note that there are some explanatory texts on larger screens.

plurals
  1. POBuilding optimized Qt4 - "./configure" flags and their meanings
    primarykey
    data
    text
    <p>I recently followed a discussion on the Qt4-interest mailing list about whether it is legal or not to build a commercial/proprietary application and statically link Qt4 into it. While there are some non-proven ways of doing so (by providing object files and a Makefile, etc. to the customer), it doesn't sound like such a good idea afterall.</p> <p>One of my projects is using the LGPL-licensed Qt4 libraries and I ship them as separate DLLs/Dylibs/so's to my customer, using a simple installer on all platforms. While this works pretty good so far, I'd like to optimize a) the size of the installer by reducing the Qt library size by just including what I need, b) increase the startup/loading speed of my application.</p> <p>I'm familiar with compiling Qt myself, but Qt got a lot of flags and switches.</p> <p>Right now I'm building with the following flags:</p> <pre><code>./configure \ -fast \ -opensource \ -qt-sql-sqlite \ -nomake demos examples \ -silent \ -no-qt3support \ -no-gif \ -plugin-sql-mysql \ -release \ -no-xmlpatterns \ -no-multimedia </code></pre> <p>I'm not entirely sure which effect/impact the following flags have:</p> <ul> <li><code>-no-stl</code></li> <li><code>-no-javascript-jit</code></li> <li><code>-no-nis</code></li> <li><code>-separate-debug-info</code></li> <li><code>-no-openvg</code></li> <li><code>-no-mitshm</code></li> </ul> <p>Is there anything else I can do, for instance, by providing optimization switches for the compiler, or "stripping" unused functions out of the built Qt library to make it smaller (which would be easy with static builds). I don't have much experience with that.</p> <p>Oh, just as a side-note, my compiled application size is about 600 kb (non-stripped) when linking against Qt dynamically. I experimented with it and found it to be around 4 MB in size when I link statically; but that way I wouldn't have to include 40 MB of Qt libraries anymore.</p> <p>So, to put everything above into a question/request:</p> <p><strong>If you are more advanced than me on this topic, how do you optimize/deploy your own applications and make sure they start fast and only contain what is needed?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload