【发布时间】:2011-07-10 02:08:53
【问题描述】:
我从朋友那里得到了一些代码,在同一个系统(Windows 7)和同一个Visual Studio Ultimate 2010上开发,所有的库都相对映射。
代码已构建,但在尝试运行时出现错误:
应用程序配置错误导致应用程序启动失败”
在可执行文件上运行 Dependency Walker 显示 msvcr90.dll、ieshishm.dll、ieframe.dll 和 freeglut。找不到 dll。我将这些复制到 execs 目录并解决了这些问题。但是,仍然存在两个问题:
错误:“e:\projects\darwin\code\debug\GLTEMPLATE.EXE”的并排配置信息包含错误。应用程序无法启动,因为它的并排配置不正确。请查看应用程序事件日志或使用命令行 sxstrace.exe 工具了解更多详细信息 (14001)。 警告:由于延迟加载依赖模块中缺少导出功能,至少有一个模块存在未解析的导入。
SHLWAPI.DLL 和 IEFRAME.DLL 模块被标记为红色(假设错误消息与这两个有关,我该如何解决?)。
另外,sxstrace 给出了以下结果:
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = E:\Projects\Darwin\Code\Debug\GLTemplate.exe
AssemblyDirectory = E:\Projects\Darwin\Code\Debug\
Application Config File =
INFO: Parsing Manifest File E:\Projects\Darwin\Code\Debug\GLTemplate.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.DebugCRT(...)
INFO: Resolving reference Microsoft.VC90.DebugCRT
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.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at E:\Projects\Darwin\Code\Debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at E:\Projects\Darwin\Code\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at E:\Projects\Darwin\Code\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at E:\Projects\Darwin\Code\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.
(...)
还有一些类似的。
我还尝试按照其他相关帖子中的建议将运行时库从多线程调试 DLL (/MDd) 更改为多线程调试 (/MTd)。但是,我得到了:
MSVCRTD.lib(MSVCR100D.dll) : 错误 LNK2005: _printf 已在 LIBCMTD.lib(printf.obj) 中定义
还有五个类似的。排除 LIBCMTD.lib 允许我构建。但是,我仍然无法运行该应用程序。我得到了和一开始一样的错误。
出了什么问题,我该如何解决?
到目前为止,没有其他相关帖子给我答案。
【问题讨论】:
标签: c++ visual-studio-2010 linker