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

user181351 picture user181351 · Dec 14, 2010 · Viewed 16.3k times · Source

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?

Answer

leanid.chaika picture leanid.chaika · Oct 15, 2011

I just add -mwindows to linker flags.