如何创建独立的exe(VC ++ 2008 EE) [英] How to create a stand-alone exe (VC++ 2008 EE)

查看:80
本文介绍了如何创建独立的exe(VC ++ 2008 EE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Visual C ++的新手.我正在使用2008 Express Edition. 无论如何,我已经创建了一个Windows窗体项目,该项目将通过CD分发.我只希望能在不给用户带来任何麻烦的情况下运行.基本上是一个独立的exe. 我正在使用发布版本并进入属性,并已将运行时库更改为多线程(/MT),以希望所有必需的内容都将随它一起使用.我也看过了MFC/ATL设置. 不管我做什么,尽管都行不通.即使我设置了MFC/ATL设置.我得到的错误是: cl:命令行错误D8016:'/MT'和'/clr:pure'命令行选项不兼容 我也看过CLR设置,但是它要么是相同的(但显然更改了哪个CLR),否则如果没有指定,则会带来大量新错误. 如果我不更改运行时库,则它可以在我的PC上正常运行,但会弹出"Application Configuration Incorrect"(应用配置错误)消息.其他电脑上的错误. 有人有想法吗?我知道以前可能已经问过几次这个问题,但是我们工作中的浏览器过滤器喜欢阻止随机地址,今天看来,绝大多数MSDN都在其中.我相信我正在尝试做一些静态链接,听起来不错,虽然我意识到这会增加exe的文件大小,但这并不重要. 预先感谢.

I'm pretty new to Visual C++. I'm using the 2008 Express Edition. In any case, I've created a windows forms project that's going to be distributed via CD. I'd just like something that will run without any hassle to the user. Basically a stand-alone exe. I'm using the release build and gone into the properties, and have altered the Runtime Library to Multi-threaded (/MT) in the hope that all the required stuff will go with it. I've also had a look at the MFC/ATL settings. No matter what I do though it just won't work. Even if I set the MFC/ATL settings. The error I get is: cl : Command line error D8016 : '/MT' and '/clr:pure' command-line options are incompatible I've also had a look at the CLR settings but it either comes up the same (but obviously changing which CLR) or brings up a whole load of new errors if I specify none. If I don't alter the Runtime Library it works fine on my PC but brings up the "Application Configuration Incorrect" error on other PCs. Anybody got any ideas? I know this has probably been asked several times before but our browser filter at work likes to block random addresses and it seems today that the vast majority of MSDN is on it's list. I believe I'm trying to do something to statically linking, which sounds fine and dandy and whilst I realise it'll increase the exe's file size, that's no biggie. Thanks in advance.

推荐答案

Visual C ++可再发行组件包应安装在目标PC上.
Visual C++ Redistributable Package should be installed on target PC.


这篇关于如何创建独立的exe(VC ++ 2008 EE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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