我们有一个 c++ 应用程序,我最近从 Linux/gcc 移植到使用 Visual Studio 2005 在 Windows 上构建。该应用程序使用第 3 方库,该库仅提供使用优化的 CRT DLL 的 DLL(即它们不提供链接到调试 CRT DLL)。对于 VS2005,这似乎不是问题 = 调试版本在 System32 目录中找到了优化的 CRT DLL。
我现在正在尝试使用 VS2008 构建和运行我们的应用程序,但调试构建无法运行,因为它找不到优化的 CRT DLL (msvc690.dll)。VC9 CRT DLL 被隐藏在具有 GUID 样式名称的目录中 - 我相信这是一个并行程序集,应用程序应该使用应用程序的清单来定位它。但是,在应用程序 exe 中构建和嵌入的清单仅指定调试 CRT 程序集:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
我不是 Windows 专家(至少不再是),所以这对我来说是全新的。这里的正确解决方案是什么?我需要告诉清单编译器将优化的 CRT DLL 添加到程序集中吗?如果是这样,我该怎么做?