Visual Studio 2010制作exe [英] Visual Studio 2010 Make exe

查看:96
本文介绍了Visual Studio 2010制作exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个VC ++项目,我想制作一个exe文件,我可以在另一台没有安装Visual Studio的计算机上运行。我需要做什么?

I got an VC++ project that I would like to make an exe file that I can run on another computer that does not got visual studio installed. What do I need to do make one?

Raffe

推荐答案

嗨Raffep,

Hi Raffep,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

如果想要你的VC ++项目制作一个exe,你应该让你的项目类型为
控制台应用程序 MFC应用程序。 构建之后,你会发现exe文件位于... \Debug或\ Release文件夹,然后你可以在没有安装Visual Studio的情况下在机器上运行这个exe文件。

If want to your VC++ project to make an exe, you should make your project type is Console Application or MFC Application. After build you will find the exe file is locate at ...\Debug or \Release folder, then you can run this exe file on the machine without install Visual Studio.

一些细节步骤:

1。创建一个新的C ++ Win32控制台应用程序项目。

1. Create a new C++ Win32 Console Application project.

2。在主要代码中添加以下代码:

2. Add below code in the main:

#include "stdafx.h"
#include "iostream"


int _tmain(int argc, _TCHAR* argv[])
{

	for (int i = 1;i<=1000;i =10)
	{

     std::cout << "Hello World!" << std::endl;
	
	}

  return 0;

}

3。构建它,你就可以得到exe。

3. Build it and you can get the exe.

4。在另一台机器上运行此exe。

4. Run this exe on another machine.


这篇关于Visual Studio 2010制作exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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