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

查看:32
本文介绍了隐藏 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天全站免登陆