隐藏Windows应用程序的控制台 [英] Hide console of Windows Application
问题描述
我有一个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屋!