如何停止使用MinGW(g ++)编译的程序在Windows中打开控制台窗口 [英] How to stop a program compiled with MinGW (g++) from opening a console window in windows
本文介绍了如何停止使用MinGW(g ++)编译的程序在Windows中打开控制台窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用MinGW g ++编译了一个程序。当我运行它时,除了主应用程序窗口之外,它还会打开一个控制台窗口。什么是编译器标志来阻止这个?
I compiled a program using MinGW g++. When I run it, it opens a console window in addition to the main application window. What's the compiler flag to stop this?
推荐答案
我相信编译器开关是 -Wl, -subsystem,windows
。
-Wl,< options>
< options>
给链接器。 -subsystem
开关告诉链接程序在生成可执行文件时指定哪个系统。
The -Wl,<options>
switch passes <options>
to the linker. The -subsystem
switch tells the linker which system to target when generating the executable.
这篇关于如何停止使用MinGW(g ++)编译的程序在Windows中打开控制台窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文