简体   繁体   中英

How to stop a program compiled with MinGW (g++) from opening a console window in windows

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?

我只是将-mwindows添加到链接器标志。

I believe the compiler switch for that is -Wl,-subsystem,windows .

The -Wl,<options> switch passes <options> to the linker. The -subsystem switch tells the linker which system to target when generating the executable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM