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

Paul Miller paul at fxtech.com
Thu Dec 17 22:16:56 CET 2009


On 12/17/2009 1:51 PM, David Ching wrote:
> "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.

Thanks for the detailed explanation. This is sort of what I had deduced 
from my day wasted googling.

The thing is, in my projects, I am definitely not defining 
_BIND_TO_CURRENT_VCLIBS_VERSION. Is there some other way this could 
become automatically enabled? I wish there was a project setting for C++ 
apps where you could specify which runtime you want.

> 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.

Probably by modifying the mkspec?

What would happen if I REMOVED the ATL update?

Will reverting back to VS2008 RTM (not SP1) make the problem "go away"?



More information about the Qt-interest-old mailing list