下载最新版 VC_redist.x86.exe / VC_redist.x64.exe for Visual Studio 2015, 2017, 2019, and 2022

目录

1、如何处理程序需要的C/C++运行时库?

2、VC_redist.x64.exe的主界面以及支持的命令行参数

3、到微软官网上下载最新版本的VC_redist.x86.exe / VC_redist.x64.exe


VC++常用功能开发汇总(专栏文章列表,欢迎订阅,持续更新...)https://blog.csdn.net/chenlycly/article/details/124272585C++软件异常排查从入门到精通系列教程(专栏文章列表,欢迎订阅,持续更新...)https://blog.csdn.net/chenlycly/article/details/125529931C++软件分析工具案例集锦(专栏文章正在更新中...)https://blog.csdn.net/chenlycly/article/details/131405795       Visual Studio编译出来的程序一般都需要C/C++运行时库,不同版本的Visual Studio对应的运行时库版本也有所不同,程序在启动时需要加载这些运行时库,如果在机器上找不到依赖的运行时库,则会报错,程序会启动失败。

1、如何处理程序需要的C/C++运行时库?

       对于程序需要的这些运行时库,可以直接将这些运行时库打包到程序安装包中,安装时直接拷贝到程序的安装路径中。也可以下载微软官方提供的Microsoft Visual C++ 发行程序包VC_redist.x86.exe / VC_redist.x64.exe:

将这个程序包集成到程序安装包中,执行程序安装操作时,先安装VC_redist.x86.exe / VC_redist.x64.exe。很多程序采用了后面的这种方式,比如我们常用的Windows版本的抓包工具WireShark,在安装过程中就能看到安装了VC_redist.x64.exe:

 在执行VC_redist.x64.exe安装时,给VC_redist.x64.exe传入了三个参数:/install /quiet /norestart,其中/quiet参数表示静默安装,不弹出VC_redist.x64.exe的安装界面。

2、VC_redist.x64.exe的主界面以及支持的命令行参数

       以VC_redist.x64.exe为例,其安装界面如下所示:

扫描二维码关注公众号,回复: 15484582 查看本文章

       可以在cmd命令行窗口中切换到VC_redist.x64.exe程序的路径中,然后输入:VC_redist.x64.exe -help或者 VC_redist.x64.exe /help 查看VC_redist.x64.exe支持哪些具体的命令行参数,如下所示:

从上图中看了WireShark安装包中使用的三个参数:/install /quiet /norestart。 

3、到微软官网上下载最新版本的VC_redist.x86.exe / VC_redist.x64.exe

       可以到微软官网上去下载不同Visual Studio版本对应的VC_redist.x86.exe / VC_redist.x64.exe,微软官网链接为:

​​​​​​Microsoft Visual C++ Redistributable latest supported downloadshttps://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist

猜你喜欢

转载自blog.csdn.net/chenlycly/article/details/131451865