与“由于未找到myproject.dll而导致此应用程序启动失败”的处理。错误 [英] What to do with "This application has failed to start because myproject.dll was not found." error

查看:72
本文介绍了与“由于未找到myproject.dll而导致此应用程序启动失败”的处理。错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与项目B链接的项目A。B被编译成.dll,而A是主程序,并编译成.exe

I have a project A linked to a project B. B is compiled into a .dll while A is the main program and compiled into a .exe

的项目已完成,没有任何问题,但是当我运行该程序时,出现一个弹出窗口,提示此应用程序未能启动,因为未找到B.dll。重新安装该应用程序可能会解决问题。

The compiling of the projects is done without any issues, but when I run the program, I get a pop-up window saying "This application has failed to start because B.dll was not found. Re-installing the application may solve the problem."

我已经进行了几次清理,试图移动dll,但这是行不通的。

I have done several cleanings, tried to move the dll, but that won't work.

我正在使用Visual Studio 9.0 btw

I am using visual Studio 9.0 btw

推荐答案

Windows加载时EXE,它将直接或间接检查所需的DLL。在您的情况下,A.EXE将需要B.dll。 Windows确定该列表后,它将使用此过程进行定位DLL:

When Windows loads an EXE, it will check what DLL's are needed, directly or indirectly. In your case, A.EXE will need B.dll. When Windows has determined that list, it will use this procedure to locate the DLLs:


  • 可执行文件的存储目录[1]

  • 当前目录,由CreateProcess()设置

  • Windows系统目录(包含大多数Windows DLL,例如USER32.DLL)

  • Windows目录(用于

  • PATH变量中的目录(也出于遗留原因)

  • The directory where the executable is stored [1]
  • The current directory, as set by CreateProcess()
  • The Windows system directory (holds most of the Windows DLLs such as USER32.DLL)
  • The Windows directory (for legacy reasons, mostly)
  • The directories from the PATH variable (also for legacy reasons)

[1]符号链接可能导致可执行文件具有多个路径。确切地说,这是传递给CreateProcess的可执行文件的路径。

[1] Symbolic links can cause an executable to have multiple paths. To be precise here, it's the path of the executable that was passed to CreateProcess.

这篇关于与“由于未找到myproject.dll而导致此应用程序启动失败”的处理。错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆