For gcc on Windows, two things should be considered to build a non-console Windows app:
- Compiler option
-mwindows
- Have
WinMain()
It is possible, however, to manually specify -Wl,-subsystem,windows
to the linker and include gdi32
and comdlg32
into the build. This is exactly what -mwindows
automates.