简体   繁体   English

将MFC库复制到项目

[英]Copy MFC Library to project

I am new to C++, and I have made a program on visual studio 2010. I then made an installer for it using Inno Setup . 我是C ++的新手,我已经在Visual Studio 2010上编写了一个程序。然后,我使用Inno Setup为此进行了安装 When I install it on my computer it runs fine, but when I move it to another computer and install it, an error appears like "mfc100ud.dll" is missing from your computer". 当我在计算机上安装它时,它运行良好,但是当我将其移至另一台计算机上并安装它时,将出现错误消息,例如“ mfc100ud.dll”从您的计算机中丢失了。

My question is: If I just copy the MFC files into my visual studio project directory, make another installer for it and run it on another computer; 我的问题是:如果仅将MFC文件复制到我的Visual Studio项目目录中,请为其创建另一个安装程序,然后在另一台计算机上运行它。 will the program work? 该程序可以工作吗? Or do I have to do something else? 还是我需要做其他事情? Any help would be appreciated. 任何帮助,将不胜感激。

That 'd' in mfc100ud means you have linked to the debug version of MFC. mfc100ud中的“ d”表示您已链接到MFC的调试版本。 The debug dll is only available with Visual C++ installed. 调试dll仅在安装Visual C ++时可用。 You need to build a release version of your program. 您需要构建程序的发行版。 And you need to include the VC redistributable package in your installer, or change the runtime and MFC libraries to statically link into your program. 并且您需要在安装程序中包括VC可再发行组件包,或者更改运行时和MFC库以静态链接到程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM