How to stop a program compiled with MinGW (g++) fr

2020-01-25 00:58发布

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?

2条回答
姐就是有狂的资本
2楼-- · 2020-01-25 01:47

I just add -mwindows to linker flags.

查看更多
祖国的老花朵
3楼-- · 2020-01-25 02:00

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.

查看更多
登录 后发表回答