Onega

a lot of VC++ posts, a few C# posts, and some miscellaneous stuff

Sunday, March 20, 2011

QT 4.7.0 Debug version

When building an application in debug configuration via VC++ 2010, it always reported application initialization error. depends.exe reported that some DLL are not loaded properly. I tried to copy VC++ 2008 SP0 (Feature Pack) and SP1 debug CRT files (Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT) but does not help. Finally the issue is found: QT 4.7.0 files (QtCored4.dll, QtGuid4.dll) depends on a special version of msvcp90d.dll, msvcr90d.dll ("9.0.21022.8"). Version of Microsoft.VC90.DebugCRT.manifest for SP0 is "9.0.30411.0", and it is "9.0.30729.1" for SP1. None of them matches Qt requirement. The workaround is put a local copy of Microsoft.VC90.DebugCRT.manifest to the debug executable folder, and modify its version to "9.0.21022.8".
The manifest information in QtCored4.dll can be read by VC++ 2010 IDE (resource editor), or ManifestView.exe.
Background: VC Runtime Binding.