如何确定我的程序需要运行哪些c ++可再发行组件? [英] How do I determine which c++ redistributables my program needs to run?

查看:105
本文介绍了如何确定我的程序需要运行哪些c ++可再发行组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能需要为vs2012和vs2010安装vcredist吗?

Is it possible that I need to install both a vcredist for vs2012 AND for vs2010?

我只是遇到一个错误,我的应用程序无法加载.dll它突然开始工作后,我做了一个无关的安装,这促使我猜测,它必须已经安装了一个旧的vcredist固定的问题。
但是我确定我使用的是c ++ 11的功能。

I just had an error where my app couldn't load a .dll and it suddenly started working after I did an unrelated installation, which prompted me to guess that it must have installed an older vcredist which fixed the issue. However I'm sure I'm using c++11 features.

推荐答案

拥有。我讨厌它,我讨厌你必须在Windows上编写安装的方式。 ...现在感觉更好了...

Deployment is a job on its own. And I hate it, I hate the way you have to write installations on Windows. …So that feel better now…

你只需要一个vcredist。链接器决定链接您的程序的那个。如果你安装了Windows SDK's,你会发现实际的redist在:

You only need one vcredist. The one the linker decided to link your program to. If you have the "Windows SDK's" installed you will find the actual redist in:

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86

如果您安装所有更新包括不重要的更新,Microsoft将更新您的redist在该文件夹!

If you install all updates including the not important ones, Microsoft will update your redist in that folder!

也许你有一个可执行文件,不想运行,你需要依赖者步行者。一个工具,这样有用的是微软必须从Visual Studio中删除它。下载程序并打开你的exe。你不需要了解真正发生的事情。只要在打开期间没有对话框出现,一切都好,即使底部窗口有感叹号。如果对话框出现类似无法解决比看在底部窗口。通常现在在较低的窗口中有类似
msvcr.dll或msvcr100.dll或msvcr110.dll。
如果它在扩展名之前包含d,例如msvcr100d.dll,则可执行文件在调试模式下编译,您的旅程将在没有安装编译器的系统上结束。如果没有,名称告诉你你需要哪个vcredist:

Maybe you have an executable, which do not want to run, you need the dependency walker. A tool, so usefully that Microsoft had to remove it from the Visual Studio. Download the program and open your exe in it. You do not need to understand what really happen. As long as no Dialog comes up during opening, everything is okay, even if there are exclamation marks in the bottom window. If a Dialog comes up with something like "Could not resolve" than look in the bottom window. Usually there is now in the lower window something like "msvcr.dll" or "msvcr100.dll" or "msvcr110.dll". If it includes an "d" before the extension like "msvcr100d.dll" the executable was compiled in debug mode and your journey ends on a system without installed compiler. If not, the name is telling you which vcredist you need:

msvcr100 = VS 2010 redist (32bit) (64位)

msvcr100 = VS 2010 redist (32bit) (64bit)

msvcr110 = VS 2012 redist (32/64bit?)

msvcr110 = VS 2012 redist (32/64bit?)

有时候不是msvcr,但它总是以ms开头。当然程序会告诉你每一个缺少的dll,不仅是microsofts和在dll中使用哪个命令。这有时是非常有用的。
您必须对可执行文件夹中的每个dll都这样做,因为它们也有不可解析的依赖关系。

回到第一个问题。你的程序只能链接到msvcr100或msvcr110,而不是两者,这就是每个可执行文件只需要一个vcredist的原因。
正如评论中提到的,第三方DLL可能有罪使用不同的msvcp版本。所以,是的,你必须搜索所有的DLL,你使用,你必须安装两个vcredist一些时间。

sometimes it is not msvcr but it always starts with "ms". Of course the program will tell you every dll which is missing, not only microsofts and which command in the dll is used. This is sometimes extremely useful. You have to do that with every dll in the folder of your executable as they can also have unresolveable dependencies.
Back to your first question. Your program can only link to msvcr100 or msvcr110, not to both, that is the reason you only need one vcredist per executable. As mentioned in a commentary, A third party DLL can be guilty of using a different msvcp version. So yeah, you have to search all DLL's you use and you have to install both vcredist some times.

PS:总是至少有两个,msvcr和msvcp 。

PS: There are always at least two of them, msvcr and msvcp.

这篇关于如何确定我的程序需要运行哪些c ++可再发行组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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