win32 Application 和Win32 Console Application 的区别

Win32 Application和Win32 Console Application
都是工作在32位Windows环境的程序。  

其中Win32 Application
就是普通的常见的窗口应用程序,当然有的界面做得比较个性化,比如圆形的、

不规则形状的……
它们都是所谓的GUI(Graphics User
Interface图形用户接口),我们可以通过鼠标点

击来完成控制。  

而Win32
Console
Application(win32控制台应用程序)往往是像MS-DOS窗口(XP中叫命令提示符)的样

子出现,我们得用键盘输入各种命令来使用它;
或者叫CUI(Character User
Interface字符用户接口)。  

vc6里Win32 Application和Win32
console
Application的区别:

很多VC初学者可能会常遇到如下链接错误:  
Linking...
/subsystem:windows  
LIBCD.lib(wincrt0.obj) : error
LNK2001: unresolved external symbol WinMain
@16  

Debug/TestWin.exe : fatal error LNK1120: 1
unresolved externals  
Error executing
link.exe.  

解决方法是:将project-settings-link的project
options里的/subsystem:windows


成/subsystem:console  

原因:Win32
Application的入口函数为WinMain  
Win32 Console
Application的入口函数是main  

换句话说,如果你编写传统的C程序,必须建立Win32
Console程序,但VC里面默认的是Win32  

Application,于是上面提及的链接错误就就经常出现了。而Win32
Application和Win32
Console的区别

就在于VC里链接参数不同。

有人问如何才能使Console
Application运行完全后自动关闭其窗口。
MS-Dos窗口只有在Debug时才会出现,编译之后,直接运行编译文件,关闭文件时窗口会自动关闭。

win32 Application 和Win32 Console Application 的区别,布布扣,bubuko.com

时间: 2024-08-06 19:38:01

win32 Application 和Win32 Console Application 的区别的相关文章

c# 通过win32 api 得到指定Console application Content

已知的问题: 1. 调试的时候会报IO 异常,非调试环境是正常的 2. Windows 应用程序才可以使用,可以用非windows应用程序包一层 using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using Syst

【转】win32 Application和win32 Console Application

这几天在创建MFC项目时,常常遇到一下两个连接错误,例如: 1. LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main解决方法: [Project] --> [Settings] --> 选择"Link"属性页, 在Project Options中将/subsystem:console改成/subsystem:windows. 2. 还有一种经常出现的相反的情况 LIBCD.lib(win

API、Win32 SDK、Win32项目、MFC、Windows窗体应用程序的区别

[原]API.Win32 SDK.Win32项目.MFC.Windows窗体应用程序的区别 首先来看一下每一个术语的定义: API:Application Programming Interface.Windows操作系统提供给应用程序编程的接口, 简称 为API函数. Win32 SDK:SDK(Software Development Kit)中文是软件开发包.则Win32 SDK是Windows 32位平台下的软件开发包,包括了API函数.帮助文档.微软 提供的一些辅助开发工具. Win3

Fix Visual Studio 2013 Razor CSHTML Intellisense in Class Library or Console Application

https://mhusseini.wordpress.com/2015/02/05/fix-visual-studio-2013-razor-cshtml-intellisense-in-class-library-or-console-application/ I tried to use a .cshtml file and the razor syntax in a console application. I was able to build the project, but the

wcf services host in a console application

一个serviceHost多个wcf服务,宿主为console 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.ServiceModel; 5 using System.ServiceModel.Activation; 6 using System.ServiceModel.Web; 7 using System.Text; 8 9 namespace WcfRestS

Hello World 之 控制台版本(Console Application)

原文:Hello World 之 控制台版本(Console Application) 先来介绍下Hello, World   "Hello, World"程序指的是只在计算机屏幕上输出"Hello, World!"(意为"世界,你好!")这行字符串的计算机程序.一般来说,这是每一种计算机编程语言中最基本.最简单的程序,亦通常是初学者所编写的第一个程序.它还可以用来确定该语言的编译器.程序开发环境,以及运行环境是否已经安装妥当. 将输出字符串&q

隐藏控制台console application窗口

  如题,在windows上新建控制台应用程序的时候,怎么才能将console 黑窗口隐藏起来.   第一种方法: ::SetConsoleTitle(_T("test_exe")); HWND hwnd=::FindWindow(_T(""),_T("test_exe")); ::ShowWindow(hwnd,SW_HIDE); 不行,试了,不清楚为什么失败-. 窗口句柄抓到了,就是不明白为什么隐藏不了......⊙﹏⊙b汗 两种方法抓到的句

Console Application

控制台应用程序模板 控制台应用程序项目模板添加创建控制台应用程序所需的项.通常将控制台应用程序设计为没有图形用户界面 (GUI),并编译成可执行文件.通过在命令提示符处键入指令来与控制台应用程序交互.作为对您的输入的响应,应用程序可能同样会在命令提示符处返回信息.这种输入和输出的直接交换使您可以利用控制台应用程序非常方便地学习编程技术,而不必额外学习 GUI 层的知识.. Console Application

A minimal wxWidgets console application

learning by doing, recently i'm learning English, and maybe from now on, i'll post article in English (if possible). in the very beginning, it may diffcult for me, but it doesn't matter, i hope it will help me a lot. :-) and here is the minimal wxWid