MSVCP140.dll missing(MSVCP140.dll 丢失)
问题描述
我刚刚用 C++ 开发了我的第一个程序,我想和我的一个朋友展示它.可悲的是,当他尝试打开 exe 时,它收到一条错误消息,显示MSVCP140.dll 丢失".为什么会出现这个问题,他/我该如何解决?
I just developed my first program in C++ and I wanted to show it with one of my friends. Sadly, when he tries to open the exe it gets an error which says "MSVCP140.dll is missing". Why is this issue happening and how can he/I fix it?
推荐答案
要么让你的朋友下载运行时 DLL(@Kay 的回答),要么用静态链接编译应用程序.
Either make your friends download the runtime DLL (@Kay's answer), or compile the app with static linking.
在visual studio中,转到Project选项卡->属性 - >配置属性 ->C/C++ ->运行时库的代码生成选择/MTd为调试模式,/MT为发布模式.
In visual studio, go to Project tab -> properties - > configuration properties -> C/C++ -> Code Generation on runtime library choose /MTd for debug mode and /MT for release mode.
这将导致编译器将运行时嵌入到应用程序中.可执行文件会大很多,但无需任何运行时 dll 即可运行.
This will cause the compiler to embed the runtime into the app. The executable will be significantly bigger, but it will run without any need of runtime dlls.
这篇关于MSVCP140.dll 丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MSVCP140.dll 丢失
基础教程推荐
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- CString 到 char* 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
