[Qt5-feedback] Qt major versions
marius.storm-olsen at nokia.com
marius.storm-olsen at nokia.com
Wed May 25 17:51:59 CEST 2011
On 25/05/2011 08:21, ext Konstantin Tokarev wrote:
> 25.05.2011, 16:39, "Charley Bay" <charleyb123 at gmail.com>:
>> What about out-of-the-box support for static library linking?
>> While not perfect for every application, large desktop applications
>> like Maya could simply statically-link the required Qt version, and
>> never suffer the "anomalies" of system Qt library upgrade.
>>
>> I've built-and-statically-linked Qt, but IMHO it would be nice if
>> the static libs were a first-class deployment option (e.g.,
>> automatically available when Qt is installed, I'm a commercial
>> customer).
>>
>> Yes, LGPL applications would still need dynamic linking, so I
>> concede that doesn't address the problem from that standpoint.
>>
>> Anybody out there shipping with statically-linked Qt?
>
> Static linking is an ugly solution. While it goes when product is one
> executable file, it significantly bloats size when several binaries
> are built, and it truly sucks in case of "application + library +
> lots of plugins", because Qt is linked multiple times.
>
> Dynamic linking itself does not cause any troubles as long as you can
> ship all needed libraries with your product.
For applications which are paranoid about only using their own version
of Qt, also for plugins etc; and want to distribute their own version
whenever they've tested it; and which is also compatible with LGPL, you
have the option to use an infixed Qt.
configure -qtlibinfix maya
would then create QtCore_maya4.dll on Windows, and all your plugins
could link to the same. That way they are unaffected by any other
installed Qt and unrelated application installs/upgrades.
There's *always* a risk that something else breaks when you do a change
to a library, although we try to keep BC as best as possible. Even if we
added Minor version number to the library, a Patch release security
update might still affect your application! If we add both Minor and
Patch numbers to the libraries, then it would be exactly the same as
using your own custom infix.
So, if the risks are unacceptable to you, then just use a custom Qt with
your own infix, and accept the responsibility to upgrade Qt whenever
required, and push those to your customers in a timely manner.
--
..marius
More information about the Qt5-feedback
mailing list