在调试模式下找不到 msvcr90d.dll

我发现 未找到 MSVCR90D.dll在调试模式下使用 Visual C++ 2008 问题,但没有一个给出的答案真正给出了问题的答案.他们中的大多数都指向关闭增量链接,但没有解释错误的真正原因以及如何在不关闭增量链接的情况下修复.

I found MSVCR90D.dll not found in debug mode with Visual C++ 2008 question but none of given answers really gives answer to the question. Most of them point to turning off incremental linking but don't explain the true cause of the error and how it can be fixed without turning off incremental linking.

我想提一下,我的情况与原始问题中的情况略有不同.我使用的是 Visual Studio 2008 中的 C++ 编译器,但在 Qt Creator 中而不是在 Visual Studio 中.

I'd like to mention that my situation is a little different than the one in the original question. I am using C++ compiler from Visual Studio 2008 but within Qt Creator not within Visual Studio.

有人吗?

推荐答案

以下是编译器的输出.奇怪的是,第二次运行 build 成功了.但是我怀疑这个问题可能是由于运行 mt.exe 时出现这个错误,它负责将清单中的信息嵌入到可执行文件中...

Below is output from compiler. It's strange that running build the second time succeeds. However I suspect the problem might be due to this error with running mt.exe which is responsible for embedding information from manifest into executable...

Generating Code...
link /LIBPATH:"c:Qt4.5.2-vclib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"debugformExtractor.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debugformExtractor.exe @.
mD932.tmp
mt.exe -nologo -manifest "debugformExtractor.intermediate.manifest" -outputresource:debugformExtractor.exe;1
'mt.exe' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'mt.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 9.0VCBIN
make.exe"' : return code '0x2'
Stop.
Exited with code 2.

更新

在链接过程中未能运行 mt.exe 确实是问题的原因.我将 Windows SDK 的路径 (C:Program FilesMicrosoft SDKsWindowsv6.0Ain) 添加到 PATH 环境变量中,现在我可以运行可执行文件了.

Failing to run mt.exe during the linking process was indeed the cause of the problem. I added path to Windows SDK (C:Program FilesMicrosoft SDKsWindowsv6.0Ain) to the PATH environment variable and I'm able to run executable now.

对各种答案的评论;

@Shay

从 sxstrace 输出的 txt 文件是空的.不知道为什么.但是应用程序日志中有以下信息:

Output txt file from sxstrace is empty. Have no idea why. However there's the following information in the application log:

Faulting application formExtractor.exe, version 0.0.0.0, time stamp 0x4a638ee1, faulting module MSVCR90D.dll, version 6.0.6002.18005, time stamp 0x49e03824, exception code 0xc0000135, fault offset 0x0006f04e, process id 0xf68, application start time 0x01ca08ba801ac5cf.

版本 6.0.6002.18005?
这是什么鬼?

Version 6.0.6002.18005?
What the heck is this?

@Kirill V. Lyadvinsky

@Kirill V. Lyadvinsky

Dependency Walker 在
中找到qtwebkit4.dll文件使用的msvcr90d.dllc:windowswinsxsx86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35ebMSVCR90D.DLL

Dependency Walker finds msvcr90d.dll used by qtwebkit4.dll file in
c:windowswinsxsx86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35ebMSVCR90D.DLL

但没有找到(另一个版本的?)msvcr90d.dll 文件直接由可执行文件链接.但是 DW 似乎没有在任何地方显示它的版本,是吗?

but doesn't find (the other version of?) msvcr90d.dll file linked directly by the executable. However DW doesn't seem to show it's version anywhere, does it?

formExtractor.intermediate.manifest 文件竞赛

Contest of formExtractor.intermediate.manifest file

<?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.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>

从清单文件看来,可执行文件被链接到与 qtwebkit4.dll 不同的 msvcr90d.dll 版本.奇怪的是,msvcr90d.dll 的两个版本都存在于以下子文件夹的 c:windowswinsxs 文件夹中
x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb

From the manifest file it looks like the executable is being linked to a different version of msvcr90d.dll than the qtwebkit4.dll. What's strange is the fact that both versions of msvcr90d.dll are present in c:windowswinsxs folder in the following sub folders
x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2 and x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb

有什么想法吗?

@knight666

我正在使用 Qt 框架,我完全使用我现在使用的编译器编译它,所以我认为这里没有不匹配.此外,Dependency Walker 显示丢失的 msvcr90d.dll 文件直接链接到可执行文件,因此我认为这不是任何 3rd 方库的错.

I'm using Qt framework which I compiled using exactly the compiler I'm using now so I think there's no mismatch here. Additionally Dependency Walker shows the missing msvcr90d.dll file is linked directly to the executable so it's not a fault of any 3rd party library I think.

相关文章