[Qt-interest] manifest/runtime trouble when building Qt with VS2008 SP1 command-line

David Ching dc at remove-this.dcsoft.com
Thu Dec 17 20:51:33 CET 2009


"Paul Miller" <paul at fxtech.com> wrote in message 
news:4B2A7E45.4040600 at fxtech.com...
> This is what I am seeing:
>
> 1. build my apps and all support DLLs with the Visual Studio 2008 (SP1) 
> GUI - they seem to be requesting the 9.0.30729.4148 runtimes in their 
> manifests.
>
> 2. configure/build Qt 4.5.3 with the VS 2008 Command Prompt. The resulting 
> Qt DLLs and apps (such as assistant) are requesting the 9.0.21022.8 
> runtimes!
>
> Huh? I've never had this problem before - building stuff from the Command 
> Prompt has always resulting in DLLs that are compatible with stuff built 
> from the GUI.
>
> Anyone seen this?

9.0.21022.8 is the VS 2008 RTM (not SP1) version
9.0.30729.4148 is the ATL Security Update version released Aug 2009 (not 
SP1) version

What seems to be happening is:

1) your PC was (perhaps inadvertently) updated to the ATL security patch 
with Windows Update.  This not only updates the DLL's in the WinSxS folders 
used by running apps, it also updates the redist\ folder in your Visual 
Studio 2008 installation so that anything you build from then on will expect 
these DLL's to be redistributed by you.  We (the MS VC++ MVP's) have been 
giving Microsoft tremendous grief about updating VC++ behind our backs 
without telling us that we need to update our redists.

2) Your apps/DLL's are all built with
      #define _BIND_TO_CURRENT_VCLIBS_VERSION=1
somehow being set (either in stdafx.h, in another header included by all the 
modules, or in compiler command-line switch).  This is why your manifests 
require the latest installed redist, in your case it is 9.0.30729.4148.

3) Qt is being built without this #define.  This means all the Qt DLL's 
require the RTM redists, or 9.0.21022.8.

So either you need to build your apps/DLL's without the #define to match Qt, 
or you need to build Qt with the #define to match your apps/DLL's.

Do you know of a way of making qmake add the #define to all the makefiles it 
generates?  I don't.  If there is no easy way, the easiest is to change your 
apps/DLL's.

Sorry this is so difficult.  Between MS pulling this update stunt and Qt 
just not even attempting to support the various VS installations even in 
Commercial (where there is still no prebuilt Qt for VS2008 SP1, let alone 
VS2008 ATL-Security-Update), we are left to sort all this out for ourselves. 
But hopefully this explanation makes clear what the root cause is and how to 
fix it.

-- David 




More information about the Qt-interest-old mailing list