如何在Visual Studio 2015企业版中将Visual C ++ Redistributable文件链接到Win32控制台应用程序 [英] How to link Visual C++ Redistributable files to Win32 Console Application in Visual Studio 2015 Enterprise edition

查看:80
本文介绍了如何在Visual Studio 2015企业版中将Visual C ++ Redistributable文件链接到Win32控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hi,


我构建了win32控制台应用程序并生成了.exe文件,当我运行时工作正常在我的电脑上。当我试图在不同的计算机上运行它显示程序无法运行,因为您的计算机(目标机器)缺少MSVCP140.dll。

I built win32 console application and generated .exe file, Its working fine when i run on my computer. When i tried to run on different computer it showing program can't run because MSVCP140.dll is missing from your computer (target machine).


我已读过在其他论坛和博客中静态构建它以便它可以获取运行.exe文件所需的所有文件,但它没有发生。

I have read in other forums and blogs and built it statically so that it can fetch all the files required to run .exe file but it didn't happen.


这里有属性页面中的设置我设置它:

Here are the settings in Property pages i set it up:


配置属性 - >一般:静态库中的MFC

Configuration Properties -> General: MFC in a Static Library


C / C ++ - >代码生成:运行时库=多线程 

C/C++ -> Code Generation: Runtime Library = Multi-Threaded 


我不想单独向客户提供.dll。我想向客户端提供一个简单的.exe文件,它应该包含所有必需的Redistributable .dll。

I don't want to deliver .dll to the client separately. I want to deliver a simple .exe file to client and it should have all the required Redistributable .dll included.


如果有任何变化,请告诉我包括在内。提前谢谢。 

Please let me know if any changes to be included. Thank you in advance. 

推荐答案

使用依赖性walker查看您的应用程序是否依赖于dll。如果是这样再次检查你的构建设置,也许你的活动构建配置不是你改变的那个。 

use dependency walker to see if your application is still depending on the dll. if so check your build settings again, maybe your active build configuration isn't the one you changed. 

你也可以提供一个自解压的exe,如果你不想写一个安装程序。 

also you can deliver a self-extracted exe, if you do not want to write a setup program. 


这篇关于如何在Visual Studio 2015企业版中将Visual C ++ Redistributable文件链接到Win32控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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