用VS2013建立了一个c++ console application,然后引用了一个DLL, 启动的时候报错:

The application was unable to start correctly (0xc000007b)

哪怕是如下最简单的代码也报错:

#include
"stdafx.h"

 

int
_tmain(int
argc, _TCHAR* argv[])

{

 

    return 0;

}

 

到底怎么回事那?

【分析】

查了这篇文章:

https://stackoverflow.com/questions/10492037/the-application-was-unable-to-start-correctly-0xc000007b

To start, I would suggest to test whether there is a problem between your application and its dependencies using dependency walker

 

于是去下载了Dependency walker.

http://www.dependencywalker.com/

下载后打开我的项目编译成的Exe, 结果提示无法打开,然后有如下的Log:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.

Error: Modules with different CPU types were found.

 

这个提示的意思是说CPU的架构不对。

检查了一下,项目的设置是Win32, 然后想起我引用的那个dll是64位的。原来问题在这里。

【解决方法】

把Debug目录引用的那个dll换成32位的,就解决了。

The application was unable to start correctly (0xc000007b)的更多相关文章

  1. "The Application was unable to start correctly (0xc000007b). Click OK to close the application"

    我有时将MFC编译成64位并运行,就会报这个错误. 后来查找原因,就在于系统中使用了错误的dll.比如这个程序要使用64位的dll,而你拷贝进去的是同名的32位dll.解决方法就是放置正确的dll. ...

  2. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  3. Dreamweaver cs6安装破解

    Dreamweaver 是前端开发的必备软件.目前最新版本为CS6,与CS5相比多了对HTML5.CSS3.jquery的关联支持,可以更方便的在Dreamweaver中编写前端代码. 安装准备: 1 ...

  4. SQL Server 2012 R2升级到SQL Server 2016无法正常启动数据库服务解决方案

    原定周末把公司的TFS升级到2018,由于TFS 2018需要SQL Server至少是2016以上版本,所以还需要将原来的SQL Server 2012 R2一并升级.今天早上负责的同事告诉我升级失 ...

  5. winerror.h中的内容(可以查看last error对应)

    /************************************************************************* ** winerror.h -- error co ...

  6. Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques

    Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques Jan 04, 2017, Vers ...

  7. CI加载流程小结

    无聊,决定水一把. CI(CodeIgniter)是我最早接触的一个框架,到现在也只是用了其中一点零碎的方法.一直想对其流程做个小结,却总是因各种各样的“理由”挨着.看见别人图表齐上阵,没那耐心,就从 ...

  8. Learning JavaScript Design Patterns The Module Pattern

    The Module Pattern Modules Modules are an integral piece of any robust application's architecture an ...

  9. CI框架源码阅读笔记2 一切的入口 index.php

    上一节(CI框架源码阅读笔记1 - 环境准备.基本术语和框架流程)中,我们提到了CI框架的基本流程,这里再次贴出流程图,以备参考: 作为CI框架的入口文件,源码阅读,自然由此开始.在源码阅读的过程中, ...

随机推荐

  1. Optimizing Oracle RAC

    Oracle Real Application Clusters (RAC) databases form an increasing proportion of Oracle database sy ...

  2. ubuntu安装LDAP

    参考文献: https://help.ubuntu.com/12.04/serverguide/openldap-server.html(最主要的) http://www.linuxidc.com/L ...

  3. 找不到包含 OwinStartupAttribute 的程序集

    配置一个 MVC 项目时 遇到的  vs 2013 解决办法:在 webconfig 中 <appSettings> <add key="owin:AutomaticApp ...

  4. C#基于SMTP协议和SOCKET通信,实现邮件内容和附件的发送,并可隐藏收件人

    经过几天的努力,从完全不懂SMTP到折腾出个可以发送邮件内容和附件的DEMO.话少说,直接上代码. using System; using System.Collections.Generic; us ...

  5. centos安装tomcat7

    转自:http://www.cnblogs.com/sixiweb/archive/2012/11/26/2789458.html 安装tomcat7: tomcat7下载主页: http://tom ...

  6. golang-bcc-bpf-function-tracing

    http://www.brendangregg.com/blog/2017-01-31/golang-bcc-bpf-function-tracing.html

  7. LINUX 内核守护进程

    http://alfred-sun.github.io/blog/2015/06/18/daemon-implementation/

  8. 使用jQuery实现input数值的增量和减量

    在很多电商网站中,在购物车所在页面,涉及到商品数量的时候,都会提供一个+号按钮和-号按钮来实现增1和减1,并且只允许input中输入数值.Bootstrap TouchSpin这款插件就是针对此需求而 ...

  9. Android Service总结02 service介绍

    Android Service总结02 service介绍 版本 版本说明 发布时间 发布人 V1.0 介绍了Service的种类,常用API,生命周期等内容. 2013-03-16 Skywang ...

  10. 一个最简单的通过WireShark破解SSL加密网络数据包的方法

    原文地址: http://article.yeeyan.org/view/530101/444688 一般来说,我们用WireShark来抓取包进行分析是没有多大问题的.但这里有个问题是,如果你碰到的 ...