开发者

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

开发者 https://www.devze.com 2023-01-31 02:21 出处:网络
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 t开发者_Python百科he compiler flag to stop this?I just add -mwindows

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 t开发者_Python百科he compiler flag to stop this?


I just add -mwindows to linker flags.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号