windows软件报错原因追溯
编写程序时,提示应用程序无法正常启动,然而什么提示都没有,应该怎么去查原因,最终结论是替换了对应dll
步骤
右键“我的电脑”,然后点击“管理”→“事件查看器”→“Windows 日志”→“应用程序”,查看错误信息
“E:\xxxxx\boost_python-vc120-mt-gd-1_57.dll”的激活上下文生成失败。 找不到从属程序集 Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"。 请使用 sxstrace.exe 进行详细诊断。
大概意思就是我缺少了boost_python-vc120-mt-gd-1_57.dll
相关的依赖
使用VS2013下的dumpbin程序查看依赖,在命令行中D:\Microsoft Visual Studio 12.0\VC\bin> .\dumpbin.exe /dependents xxxxxx
Image has the following dependencies:
python26.dll
MSVCP90D.dll
MSVCR90D.dll
KERNEL32.dll
对比Windows日志的内容,我们缺的就是MSVCR90D.dll这个文件了,这是要安装VS2008才有的带有调试信息的动态库。
图形端的查看工具
ht