[Qt-interest] How qt version sensitive are qt applications?

Andreas Pakulat apaku at gmx.de
Sat Mar 27 20:35:02 CET 2010


On 27.03.10 18:43:11, Robert Hairgrove wrote:
> Andreas Pakulat wrote:
> > On 27.03.10 16:09:16, Kārlis Repsons wrote:
> >> Considering the problem, lets say, Qt application was built for Qt version N1, 
> >> but on the host system there is Qt version N2 -- in general, for what N1 and 
> >> N2 will that application run on host? Is it really that N1==N2 for running?
> > 
> > Qt/Nokia guarantees that an app compiled with Qt4.x executes with
> > Qt4.x+1, that is it will start up and will generally work, but you may
> > find behavioural differences sometimes. In what way those affect your
> > app depends on which classes you've used.
> > 
> > The other direction is only possible within patchlevel releases, so
> > compiling your app with Qt4.x.y and running it on Qt4.x.y-1 is possible,
> > but not running it on Qt4.x-1.
> > 
> > Andreas
> > 
> 
> This would mean that if I want my app to work with ANY Qt4 version, I 
> must compile it with 4.0.0. I thought that all major releases were 
> backwards compatible? I.e., if someone had Qt 4.5.x installed, and I 
> compiled my app with Qt 4.6.x, it should still work OK under the lesser 
> 4.5.x but not under Qt 3.x.

In general that cannot work, 4.6 has new API that 4.5 doesn't have, so
if you've used that API then you can't run your app against an older
version that doesn't have the API (this will result in a "symbol not
found" error during execution). If however you constrain yourself to the
same API as existed in 4.5 this may be possible (I'm not sure, Thiago is
the expert on this).

Also this all only applies to Linux and probably MacOSX, Windows is a
totally different league due to the MSVC Runtime breaking its ABI upon
almost any non-trivial update to the compiler suite.

Andreas

-- 
You seek to shield those you love and you like the role of the provider.



More information about the Qt-interest-old mailing list