Right, premake4 is one of my favourite ways to build C/C++ stuff but tonight I’m thinking it has a moron involved. You can specify a project as being one of four kinds: ConsoleApp, WindowedApp, SharedLib, StaticLib. The documentation here states that this likely means /SUBSYSTEM:WINDOWS will be passed to link.exe, and indeed it is. That is how you say call WinMain and do any other I’m a GUI app magic for Windows; other wise you get a main and a command prompt; simply put.
This FAQ entry on the other hand, is just retarded.