[Qt-interest] (solved) Mismatched VC90 CRT versions in manifest file
Dave Smith
dave at thesmithfam.org
Fri Jan 29 17:36:14 CET 2010
David Ching wrote:
> Glad you solved it. I'm puzzled why the Qt DLL's "depend on an older
> version" when you said QtCore4.dll depended on 9.0.30729.4148, which is the
> latest version of the redistributables (ATL Security Update). Did you
> rebuild Qt a different way after you said that?
>
Thanks for everyone's help. I am surprised it turned out to be something
so simple, and I am very glad I didn't have to install the vcredist
package as part of my application installer.
I may have misspoken when I claimed that my Qt DLLs depended on
9.9.30729.4148, because they appear to work fine when I distribute
version 9.0.21022.8 in my application folder. I inspected the embedded
manifest file in the Qt DLLs and discovered that indeed they depend
explicitly on 21022, but so does my built executable, which I built with
VS 2008 SP1.
Oddly, if I use the vcredist package instead of distributing my own
DLLs, *both* 30729 *and* 21022 work fine. But when I distribute my own
DLLs, I only version 21022 works. Very strange.
> Regardless, if both your Qt DLL's and your .exe depend on the RTM
> redistributables, yes, you do need to redistribute the RTM version. Trouble
> is, the vc\redist folder containing these is updated to 9.0.30729.4148, and
> there is no easy way of getting the RTM ones back (that I could find),
> unless you had saved them from before the update occurred.
>
To get the old (21022) DLLs, I installed the 2008 redist package and
grabbed the DLLs and .manifest file from c:\Windows\WinSxS and bundled
them with my app. That is working for me now.
> BTW, I downloaded and installed the pre-built Qt 4.6.1 for VS2008 from
> qt.nokia.com. The Qt DLL's there were built with VS2008 RTM.
Interesting. How can you tell, since it appears that DLLs built with VS
2008 RTM and VS 2008 SP1 have an embedded manifest that depends on
version 21022 (RTM).
> So if you simply use those and also build your app without
> _BIND_TO_CURRENT_VCLIBS_VERSION defined, then no matter what the state of
> your VS2008 (RTM, SP1, or ATL Security Update), all you have to do is find
> and redist the RTM versions, and you will be fine.
Does Qt define _BIND_TO_CURRENT_VCLIBS_VERSION anywhere? I have not
explicitly defined this macro, and I am using .pro files with
qmake/nmake to do my buidls (no .vcproj for me).
Also, I should note that I am using VS 2008 SP1 *Express*, in case
anyone was wondering why something doesn't work for them with a
non-Express version.
Has anyone had this problem with a non-Express VS 2008?
Thanks again for all the help! I'm glad to hear that VS 2010 does away
with manifests. I greatly prefer the prior hell over the current hell. :)
--Dave
More information about the Qt-interest-old
mailing list