views:

668

answers:

1

Hi everyone,

I have a friend who's taking over a Visual C++ project from me and is having trouble running it. It's a graphics application and it uses the Qt GUI library. The reason I mention this is because of the error below.

He can build and link the program using Visual Studio 2010, but when he runs it this message comes up in the event viewer:

Activation context generation failed for "D:\Test\Qt\4.2.2\bin\QtGuid4.dll". Dependent Assembly Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b", type="win32", version="8.0.50608.0" could not be found. Please use sxstrace.exe for detailed diagnosis.

When we do as the message asks and run sxstrace.exe, here's what we see:

Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = Wow32 CultureFallBacks = en-US;en ManifestPath = D:\Test\Qt\4.2.2\bin\QtGuid4.dll AssemblyDirectory = D:\Test\Qt\4.2.2\bin\

--------------- INFO: Parsing Manifest File D:\Test\Qt\4.2.2\bin\QtGuid4.dll. INFO: Manifest Definition Identity is (null). INFO: Reference: Microsoft.VC80.DebugCRT,processorArchitecture="x86"type="win32",version="8.0.50608.0" INFO: Resolving reference Microsoft.VC80.DebugCRT,processorArchitecture="x86""win32",version="8.0.50608.0". INFO: Resolving reference for ProcessorArchitecture WOW64. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.DebugCRT\8.0.50608.0__1fc8b3b9a1e18e3b\Microsoft.VC80.DebugCRT.DLL. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.DebugCRT\8.0.50608.0__1fc8b3b9a1e18e3b\Microsoft.VC80.DebugCRT.DLL. INFO: Attempt to probe manifest at D:\Test\Qt\4.2.2\bin\Microsoft.VC80.DebugCRT.DLL. INFO: Attempt to probe manifest at D:\Test\Qt\4.2.2\bin\Microsoft.VC80.DebugCRT.MANIFEST. INFO: Attempt to probe manifest at D:\Test\Qt\4.2.2\bin\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.DLL. INFO: Attempt to probe manifest at D:\Test\Qt\4.2.2\bin\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.MANIFEST. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference Microsoft.VC80.DebugCRT,processorArchitecture="x86", publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0".

Sorry for the length of that message, but I thought it might jog some memories. Is this a case of his not having the Visual C++ 2005 (I believe that's where the VC80 comes from) C runtime libraries installed? If so, can he download the VC++ redistribution package and install it, and will all be well then? Or is this a completely different problem?

+3  A: 

If your friend doesn't have VS2005 installed, he will not have the debug runtime libraries for it. They're not part of the redistributable runtimes and IIRC, Microsoft prohibits you from distributing them yourself so you have to have VS2005 installed in order to get them.

I would suggest that he'd rebuild the affected library if possible; I vaguely recollect that there are a couple of articles out on the web on how to rebuilding the GPL QT using Visual Studio, which I believe is not officially supported.

Mixing C++ runtimes requires a lot of care and you can fall into a fairly nasty trap if you don't get it exactly right. If rebuilding all libraries with VS2010 is not an option, your friend will have to get hold of VS2005. It might be worth checking if MS still offers the Express Edition of VS2005 for download.

Timo Geusch