The issue of the Windows console window has come up from time to time and I've had another look at the code and made a few minor changes.
The first change is to provide an option to "./configure" to allow Poly/ML to be built as a "console" application rather than a "windows" application. Setting "--disable-windows-gui" passes -mconsole to the linker rather than -mwindows. This sets the appropriate bits in the EXE header. As well as affecting the linking of "poly" itself it also affects executables built with "polyc". The default remains "--enable-windows-gui" to build as a "windows" application.
The second change is that when Poly is built as a Windows application, the default, it puts up a GUI window only if standard output has not been provided. Previously it put up a GUI window unless both standard input and standard output were provided. If it creates a GUI window for output it also uses it for input unless there is an explicit standard input provided.
It may be helpful to provide a bit of background. I have the impression that there are two different classes of users when it comes to Poly/ML on Windows. Users from a Windows background expect the application to come with an installer, a Windows GUI and to support the standard copy-and-paste, in particular with the standard control-C/control-V key bindings. Users from a Unix background are much more used to running applications in a console window and are more likely to build applications from source. The problem is to satisfy both classes of user.
Executables in Windows can be either "windows" or "console" applications depending on the "subsystem" setting in the EXE header. "console" applications are always started with a cmd.exe-style console unless they're already in a console. "windows" applications are expected to create their own GUI. My impression is that "console" applications are regarded as a legacy of DOS and not well supported. That's why I've made "windows" mode the default. Nevertheless there may be cases where someone would like to build "poly" as a console application which is the reason for adding the option.
David