The 14.0 compiler on Windows inserts an unwanted /SUBSYSTEM:CONSOLE switch in the compiled object code of a file containing a main program. This new behaviour is immensely unhelpful when building Windows GUI applications, causing the resulting application to have an ugly and unwanted attached console window, despite correctly specifying /SUBSYSTEM:WINDOWS in the link step. This is a change in behaviour from all previous versions of Visual Fortran going right back to the original DVF 5.0. Using a hex editor to replace the word "CONSOLE" with "WINDOWS" in the object file fixes the problem, but this is a hideous solution. Surely there must be a command line switch to prevent this awful new behaviour? Or is there a switch which allows the subsystem to be specified at compile time? The latter seems completely dumb, since specifying subsystem is meant to be a link time task, but in that case why the heck is the 14.0 compiler inserting this at compile time anyway??
Switches such as /winapp or /MG seem to have no effect and /SUBSYSTEM:WINDOWS specified as a compiler (rather than linker) switch is not rejected as an "unknown option".
The problem is trivially easy to reproduce. Simply compile a trivial one-line main program with the /c switch with 14.0 and dump the resulting object file. The offending /SUBSYSTEM:CONSOLE appears near the start of the object code. Compiled with previous releases no such switch is present (and quite rightly too).