隐藏Windows应用程序的控制台 [英] Hide console of Windows Application

查看:197
本文介绍了隐藏Windows应用程序的控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Qt应用程序,当我运行这个应用程序,有一个控制台开口。在开发中是很好的,因为我看到调试输出在控制台,但是当我想给这个可执行文件给客户,应该没有控制台窗口。
如何隐藏它?

I have a Qt application, and when I run this application, there is a console opening behind it. In development it is nice because i see debug outputs on the console, but when I want to give this executable to the customer there should be no console window. how do I hide it?

(我使用Visual Studio 2008)

(I am using Visual Studio 2008)

推荐答案

听起来你的链接器配置不正确。右键单击项目,属性,链接器,系统,子系统设置。确保选择了Windows,而不是控制台。

It sounds like your linker configuration is incorrect. Right-click the project, Properties, Linker, System, SubSystem setting. Make sure "Windows" is selected, not "Console".

然后将main()更改为WinMain()。

And, change main() to WinMain().

这篇关于隐藏Windows应用程序的控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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