windows 如何解决此 MS 运行时 DLL 加载程序运行时错误 (R6034)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2350901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:02:17  来源:igfitidea点击:

How to solve this MS runtime DLLs loader runtime error (R6034)

cwindowsdllvisual-studio-2005

提问by Luca

Here is my situation:

这是我的情况:

I have a C project linking with many libraries (I haven't written this application), and it is shipped also with MSVCR71.dll and MSVCP71.dll. Even without those DLLs, the program has run fine on my system, which has MS VS2005 installed (indeed uses MSVCR80.dll and MSVCP80.dll).

我有一个与许多库链接的 C 项目(我还没有编写过这个应用程序),它也随 MSVCR71.dll 和 MSVCP71.dll 一起提供。即使没有这些 DLL,该程序在我的系统上也能正常运行,该系统安装了 MS VS2005(确实使用了 MSVCR80.dll 和 MSVCP80.dll)。

I've linked this application with other libraries, compiled on my system. Now, after having linked with those libraries, the application don't start because it cannot load MSVCR80.dll and MSVCP80.dll... very strange, I say.

我已将此应用程序与在我的系统上编译的其他库相关联。现在,在与这些库链接后,应用程序无法启动,因为它无法加载 MSVCR80.dll 和 MSVCP80.dll...很奇怪,我说。

Loader presents to me the error R6034, which should be solved building applications using the manifest file.

Loader 向我展示了错误 R6034,应该可以解决使用清单文件构建应用程序的问题。

What's wrong with this application?

这个应用程序有什么问题?



Confirm that the problem was introduced by the libraries introduced. May I compile those libraries without manifest or statically?

确认问题是由引入的库引入的。我可以在没有清单或静态的情况下编译这些库吗?

Still curious why application without linking new libraries don't find MS runtime DLLs...

仍然好奇为什么没有链接新库的应用程序找不到 MS 运行时 DLL...

采纳答案by Oleg

MSVCP71.dll is a dll used by Visual Studio 2002. MSVCR80.dll is for Visual Studio 2005. So, when you recompiled this app with VS2005 you got new dll dependencies. You cannot solve it with manifests - you should recompile it in Visual Studio 2002 or just put these new dll's into the same folder where you app is located.

MSVCP71.dll 是 Visual Studio 2002 使用的 dll。MSVCR80.dll 用于 Visual Studio 2005。因此,当您使用 VS2005 重新编译此应用程序时,您会获得新的 dll 依赖项。您无法使用清单解决它 - 您应该在 Visual Studio 2002 中重新编译它,或者只是将这些新的 dll 放入您的应用程序所在的同一文件夹中。

Edited: And yes, you can just link your application with static CRT libraries to avoid external dependencies on these dll's. But it may be not possible if one of dll's or libraries that you link with uses dynamic CRT - you should recompile them also with static CRT then.

编辑:是的,您可以将您的应用程序与静态 CRT 库链接起来,以避免对这些 dll 的外部依赖。但是,如果您链​​接的 dll 或库之一使用动态 CRT,则可能是不可能的 - 然后您也应该使用静态 CRT 重新编译它们。