未在未安装VS的Windows系统上运行的C ++程序“未找到VCRUNTIME140.dll"; [英] C++ program not running on windows systems without VS installed "VCRUNTIME140.dll was not found"

查看:443
本文介绍了未在未安装VS的Windows系统上运行的C ++程序“未找到VCRUNTIME140.dll";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译一个简单的程序时:

When I compile a simple program:

#include <iostream>

using namespace std;
void main() {
    cout << "Hello world!";
}

然后在未安装Visual Studio的另一个系统上调试已编译的.exe,我收到以下错误消息:

And tun the compiled .exe on another system without visual studio installed I receive the following error:

The Code execution cannot proceed because VCRUNTIME140.dll was not found. Reinstalling the program may fix the problem.

当我用cl.exe编译时,我没有收到任何错误, 没有人知道在不安装VCRUNTIME140.dll的系统上的解决方法. (我已经在包括Windows虚拟机的多个Windows系统上进行了测试)

When I compile with cl.exe I receive no errors, does anyone know a workaround to this without installing VCRUNTIME140.dll on the systems. (I've tested on multiple windows systems including a windows virtual machine)

推荐答案

获取适用于您的Visual Studio版本的"Visual Studio 20xx VC ++可再发行组件包".然后在目标计算机上运行以进行安装.

Get the "Visual Studio 20xx VC++ Redistributable package" for your version of Visual Studio. Then run on the target machine to install.

此页底部: https://visualstudio.microsoft.com/downloads/

或对于较旧版本的Visual Studio,在此页面底部: https://visualstudio. microsoft.com/vs/older-downloads/

Or bottom of this page for older versions of Visual Studio: https://visualstudio.microsoft.com/vs/older-downloads/

这篇关于未在未安装VS的Windows系统上运行的C ++程序“未找到VCRUNTIME140.dll";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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