sdfax.h库使我的程序无法在其他计算机上运行 [英] sdfax.h library makes my programs not work on other computers

查看:54
本文介绍了sdfax.h库使我的程序无法在其他计算机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用Visual Studio 2015,而我遇到了"stdfax.h"的问题。图书馆。它在我的电脑上工作得很完美,但是当我问朋友时,当我发送它们时,我会尝试我的程序,他们会收到一条错误消息,说MSVCP140D.dll从他们的电脑中丢失了
。但当我要求他们在另一个IDE上没有库的情况下编译代码时,我的代码工作正常。我该如何解决这个问题?

解决方案

我最近开始使用Visual Studio 2015,而我遇到了"stdfax.h"的问题。图书馆。它在我的电脑上工作得很完美,但是当我问朋友时,当我发送它们时,我会尝试我的程序,他们会收到一条错误,说他们的计算机中缺少MSVCP140D.dll
。但当我要求他们在另一个IDE上没有库的情况下编译代码时,我的代码工作正常。我如何解决此问题?

您的朋友无法运行VS2015创建的可执行文件与stdafx.h头文件无关。 有关缺少MSVCP140D.dll的错误意味着您正在分发程序的调试版本。  MSVCP140D.dll是VS2015标准C ++库DLL的
调试版本。 它不是可再发行的,并且不会出现在没有安装VS2015的任何系统上。 当您的源代码由另一个IDE编译时,生成的可执行文件中不再存在
。$


您可以通过分发发布程序的版本以及VC ++ 2015可再发行组件,它将在运行程序的目标计算机上安装必要的库。 另一个选择是构建
程序以使用静态CRT库,这将消除VC ++ CRT可再发行组件的需要。




I've recently started using Visual Studio 2015 and I'm having a problem with the "stdfax.h" library. It works perfect on my pc but when ask my friends yo try out my programs when I send them over they get an error saying that MSVCP140D.dll is missing from their computer. But when I asked them to compile the code without the library on another IDE my code worked. How do I fix this?

解决方案

I've recently started using Visual Studio 2015 and I'm having a problem with the "stdfax.h" library. It works perfect on my pc but when ask my friends yo try out my programs when I send them over they get an error saying that MSVCP140D.dll is missing from their computer. But when I asked them to compile the code without the library on another IDE my code worked. How do I fix this?

The inability of your friends to run an executable created by VS2015 has nothing to do with the stdafx.h header file.  The error about missing MSVCP140D.dll means that you are distributing a debug version of your program.  MSVCP140D.dll is the debug version of the VS2015 Standard C++ Library dll.  It is not redistributable and will not be present on any system that does not have VS2015 installed.  When your source code is compiled by a different IDE this dependency no longer exists in the resultant executable.

You can resolve this by distributing a release build of your program along with the VC++ 2015 redistributable that will install the necessary libraries on the target computers on which your program is to run.  Another option is to build your program to use the static CRT library which will eliminate the need for the VC++ CRT redistributable.



这篇关于sdfax.h库使我的程序无法在其他计算机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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