the application was unable to start correctly(0x000007b)解决方案

遇到程序崩溃的一般解决步奏

1、调试程序,定位到崩溃到码处。如果是系统代码处的问题,可以复制改行代码在百度上搜搜看;如果是你自己写的代码,那么我想改起来就更简单了。

2、一般我们所遇到的程序崩溃问题网上一定是找得到的,尽量看看国外的链接,老外们说的还是比较靠谱的。看不懂英文的话,就用chrome浏览器翻译网页吧。

回到正题,

一朋友说他运行程序出现崩溃弹窗:the application was unable to start correctly(0x000007b),由于程序没有源码无法调试。好吧,百度搜索看看。找到了一篇貌似很在行的链接:http://www.tomshardware.com/forum/43092-63-application-unable-start-correctly-0xc000007b

最终的解决方案是:

Cause:

The cause of this problem is because of the “msvcp110.dll” file located at C:\Windows\SysWOW64 . This file is used by several applications to run, but each have their own version of the file with the same name. So in order run that application, you might replace it with a different msvcp110.dll file which we normally get at http://www.dll-files.com/

So application might not work the next time you try to start it with the below error.

Solution:

Go to C:\Windows\SysWOW64 location and delete the “msvcp110.dll” file. Now try to start the Application and the program will generate a new “msvcp110.dll” file used by the application and you should be able to get the application working fine 

Hope this helps!!

翻译下也就是:缺少VS2012的C++运行库。你可以在各种软件管家里下载VS2012可发布组件,安装完后估计就可以运行了。


但是,作为程序员我们不能仅仅只是这样。严格的讲,在我们发布应用程序时一定要看看程序需要哪些组件依赖的,需要的就把它带上。因为用户的电脑上是没有开发环境的,不可能有这么些特定编译器的运行库。

如何查看程序依赖的DLL呢?

这是个很基础的技能。在1998年发布的VC6.0中微软就带上了一个DEPENDS.EXE,该工具就是来提供给开发者查看DLL依赖项的。把我们要发布的 exe、DLL拖进去你就可以清楚地看到程序需要哪些DLL依赖了。

技术分享

对于系统的DLL可以不用展开看,但是用户自己的DLL一定要展开,看看它里面还调用了哪些DLL,因为如果这个DLL缺少依赖的DLL势必影响到我们的程序的运行。如上图中,LIBCEF.dll不是系统的DLL,我们有必要看看它的DLL是否缺失,那么就展开吧:

技术分享

缺失DLL的话,那个DLL的名称会变成黄色的,如下图中该exe运行就缺少VS2008的C\C++运行库和duilib.dll

技术分享

那么在发布程序时,我们就需要把这些个DLL加入到该exe路径中去,用户也就不会遇到哪些问题了。


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。