开发者

What Visual C++ Runtimes are users likely to have installed?

What Visual C++ Runtimes are users likely to have installed?

Update: This question has become more of a "W开发者_开发知识库hat is the best way to deploy internet based applications, written in C++. That require the Microsoft Visual C++ runtime."


I don't believe Microsoft makes any guarantees on which run times are available on an OS install. It is more of a side effect of which included applications where build using the specific run time.

If you need a specific C++ run time you need to install it yourself. If you are building an MSI install Visual Studio will have installed the required merge modules. If not you can download the run time from Microsoft.

If you want to be able install by just copying a single EXE, then statically link with the run time. The run time will be built into your EXE and there will not be an external dependency.

Edit: See also this answer -> Microsoft explicitly does not guarantee any version of the C++ run time will be installed on Windows at all.


This answer is important because of the needs of internet deployment of C++ based applications.


I have found the following:

  • No fresh Windows installation comes any C++ runtime (except msvcrt.dll)
  • Windows XP and higher ship with .NET framework runtimes (which is not suitable)
  • The C++ runtime redistributables are small downloads (1-4MB apiece)
  • Automatic update does not install any C++ runtimes.
  • When a runtime is installed. Windows handles security patches as long as Microsoft Update is enabled and it is deployed using the redistributable installer.
  • Internet Deployment: Your installer (statically linked) should detect the presence of the runtime and download if not already installed. You can also use the gcc-mingw32 compiler which uses the VC 6 runtime. An internet connection is required for this approach.
  • Most major apps do not appear to statically link. But some, like Mozilla Firefox distribute custom runtimes as a DLL.

Microsoft should start including the C++ runtimes with their OSes like they do for .NET


if it is a redistributable, then it is intended to be redistributed in an installer. I would include it as a "install if not already present" item in your installer.

As to the specific question you ask, have you tried the Microsoft website? It might take a bit of searching but it should be there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜