Qt-interest Archive, July 2007
[1/2 OT] VS2005 SP1: ships new C++ runtime DLL, requires new Qt 4.3.0 (binary dist.)?
Message 1 in thread
Hi,
I just got a new version of some static library from one of our
developers, linked it with our application, started it and *bamm*,
"Unhandled exception" when loading the respective DLL (into which the
static library code is linked).
Turns out that the static library was produced with Visual Studio 2005
*SP1* which ships with new C/C++ runtime DLLs, whereas the application
itself was compiled and linked on a Visual Studio *without* SP1.
Dependency Walker indeed complained about a "broken side-by-side
configuration" when clicking at the respective DLL which contains code
produced by VS2005 SP1 and VS2005 (no SP1).
After installing SP 1 and completely recompiling the application it worked.
But what about all the other DLLs, especially Qt (this is what makes it
at least 1/2 on-topic ;)? I thought I would also need to recompile Qt
because I'd expect that this DLL would still require the old C++ runtime
DLL (which should be specified in the manifest file, or so I
understand), no? Starting the application worked fine, but after all the
old C++ runtime should still be installed on my system, in the
C:\WINDOWS\WinSxS\... folder. But latest when memory would be allocated
inside Qt and deallocated inside my application it should crash terribly
(AFAIK there is no such situation in our code, but it's theoretically
possible). I would now expect two separate heaps to be in use, one of
the old and one of the new C++ runtime DLL.
So I thought. But checking with Dependency Walker showed that the same
C++ runtime DLL is used:
c:\windows\winsxs\x86_microsoft.vc80.crt_[some numbers]\MSVCP80.DLL
for both the Qt (3) DLL and the application *.exe. How come? Doesn't the
Qt 3 DLL manifest file specify the old C++ runtime DLL to be used?
Checking my WinSxS folder shows that I have at least 3 different C/C++
runtime DLLs installed by now.
For now I'm going to recompile any DLL for which we have source code
for, just to be sure.
But in the same Qt 4 based application we use the Qt 4.3 version,
precompiled for Visual Studio 2005 - is this safe to do so?
My theory sais that (depending on whether Qt 4.3 was compiled with or
without SP1 by Trolltech) this should fail, since two different C/C++
runtime DLLs would be used (specified in the corresponding manifest
files), but in practice (Dependency Walker) it seems that this is not
the case (?). At least mixing *static* libraries from different SP
levels seems to cause trouble...
Anyone has experience with DLLs/manifests and VS2005 vs. VS2005 SP1 C++
runtime DLLs?
Cheers, Oliver
--
[ signature omitted ]