msvcp110.dll,如何解决? [英] msvcp110.dll, how do I get around it?

查看:48
本文介绍了msvcp110.dll,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下问题:我使用Microsoft Visual Studio 2012,并将msvcp110.dll添加到我的发行版中.我到处都读过一些文章,我知道这是由于我同时使用iostream和string造成的,并将它链接到我的程序.我在PC上使用它没有问题,但我想向他人展示.所以我的问题是,我如何尽可能不让他人痛苦,解决这个问题,并仍然使用一些基本的std好东西?我知道其他人可以只安装Visual Studio Runtime东西,但这有点痛苦.

解决方案

如果您打算保留您的应用程序

I have the following problem: I use Microsoft Visual Studio 2012 and it adds msvcp110.dll to my release. I've read some posts here and there and I know that it's caused by the fact I use both iostream and string and that links it to my program. I have no problem using this on my PC, but I'd like to show it to others. So my question is, how do I, as painless for others as possible, can get around the issue, and still use some basic std goodies? I know that others could just install Visual Studio Runtime stuff but it's kind of painful.

解决方案

If you intend to keep your application dynamically-linked, your end-users need to install the Visual C++ Redistributable for Visual Studio 2012.

This is the preferred way to deliver applications for the following reasons:

  1. Binary size - Your application binary will be smaller, because the library functions are not linked in.
  2. Security - The Microsoft redistributable DLLs can be updated by Windows Update. In the event that a vulnerability is found in one of their libraries, they can fix it, and all dynamically-linked programs are immediately no longer vulnerable.
  3. Memory footprint - If multiple processes are all using the same DLL, it only needs to be loaded into (read-only) memory once. All process share a copy of the DLL's text in memory, reducing the combined overall memory usage of the processes.


Alternatively, you could statically link your executable. Do this by changing the build options for the program in Visual Studio.

In Visual Studio 2010, this is under Configuration Properties > C/C++ > Code Generation > Runtime Library.

The default (/MD / /MDd) tell VS to link against their runtime DLL.

To statically link, you want to change this to one of the non-DLL options (/MT / /MTd) Make sure to select the correct Debug/Non-Debug version (the little d in the switch).


See also:

这篇关于msvcp110.dll,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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