从vc ++ 6.0(mfc)应用程序创建.exe [英] Creating .exe from a vc++ 6.0 (mfc) application

查看:133
本文介绍了从vc ++ 6.0(mfc)应用程序创建.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从mfc程序(使用VC ++ 6.0)创建.exe文件.
我了解您需要编译&生成程序,将生成一个.exe
Debug文件夹中的文件.我做到了但是,当我尝试在没有vc ++软件的其他PC上运行.exe时,它显示一条消息-"This application can not be run, .DLL not found".我想运行我的应用程序而不在Windows中安装vc ++软件.
我该怎么解决
请帮助我.

How do I create an .exe file from a mfc program (using VC++ 6.0).
I understand U need to compile & build the program and that will make an .exe
file in the Debug folder. I did that. But when I tried to run my .exe on other PC which doesn''t have the vc++ software, it is showing a message- "This application can not be run, .DLL not found". I want to run my application without installing vc++ software in windows.
how can I solve it
please help me.

推荐答案

您不能仅仅将其构建为"Normal" exe并将其移至另一台计算机:它需要许多支持文件(保存在DLL中).

我暂时没有安装VC6,但是有两种选择:
1)我似乎记得在构建选项"中有一个用于独立exe"的选项-但这可能来自以前的版本,我已经有一段时间没有这样做了.
2)使用VC6随附的InstallShield为您的应用创建安装程序(推荐).有一篇文章显示了在这里做什么:如何为VC ++应用程序创建自定义的InstallShield [ ^ ]
You can''t just build it as a "Normal" exe and move it to the other machine: it requires a number of support files (held in DLL''s).

I don''t have VC6 installed at teh moment, but there are two options:
1) I seem to remember that there is an selection in the "build options" for "stand alone exe" - but that may be from a previous version, I haven''t done that for a while.
2) Use the InstallShield that came with VC6 to create an installation program for your app (recommended). There is an article showing what to do here: How to create customized InstallShield for a VC++ Application[^]


我不明白为什么有人拒绝了您的问题...这在很多人刚开始的时候就发生了...当然,谷歌搜索可以解决这个问题,但是有时由于同样的知识不足,很难做到这一点寻找正确的解决方案...

不管怎样,这里的链接将为您提供帮助:

http://msdn.microsoft.com/en-us/library/aa260978 (v = vs.60).aspx [
I don''t understand why someone has downvoted your question... this is something that at the beginning happens to a lot of people... Of course a google search could have solved it, but sometimes the same poor knowledge makes it difficult to search for the right solution...

Anywyay, here''s a link that will help you:

http://msdn.microsoft.com/en-us/library/aa260978(v=vs.60).aspx[^]

What you need is explained in detail.

Hope this helps...

PS: This should be a complement to the first answer you''ve received (the release linking is important).


如果要使用VC6创建可执行文件,则首先必须确保它是在发布模式下编译的.完成此操作后,您必须在目标计算机上复制程序所需的所有dll.要知道哪些是必需的,可以使用一个名为"Depedency Walker"的工具(适用于Google).
一种替代方法是静态链接到所有MFC和C运行时库(此选项在项目设置中的某个位置).
If you are creating your executable with VC6, you first have to make sure it is compiled in release mode. Once this is done, you have to copy on the target computer all the dll''s which are required by your program. To know which ones are required, you can use a tool called "Depedency Walker" (google for it).
An alternative would be to statically link to all MFC and C-runtime libraries (this option is somewhere in your project settings).


这篇关于从vc ++ 6.0(mfc)应用程序创建.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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