To build Win32 GUI application, -mwindows switch is added in the link. If -mwindows is not added, -mconsole is automatically added. If -mconsole is added for building GUI application, the window of command prompt is appeared at the same time as GUI application when you invoke the program on Windows.