I think this is the nature of Windows: you can?t let single execution be both GUI and *real* console programs, because the ?subsystem? of a program is a flag of PE file formats. So, in my opinion, there?s no solution to let a GUI-based PolyML outputs something to the standard output stream of the CMD or Powershell window in which PolyML is started.
Maybe a more interesting question is this: if we built two Poly.exe from the same code base, one is ?Windows? subsystem, the other is ?Console? subsystem, can they share the same user-saved ?heap?? If the answer is YES, then user could freely choice one version of the two for each specific purposes. (I ask this because on Linux/Mac I see each time after I rebuilt PolyML, even with the same PolyML source code, all my HOL4 builds must be rebuilt too (otherwise they refuse to startup). I don?t understand why this is necessary.)
?Chun
Il giorno 08 mag 2017, alle ore 16:21, Chris Cannam <cannam at all-day-breakfast.com> ha scritto:
Earlier you said that the existing Windows distribution should be usable without GUI if the I/O streams are redirected. If I try something like this:
echo 'print "hello, world\n";' | & 'C:\Program Files\Poly ML\PolyML.exe'
the GUI window appears for a moment then disappears, and no output goes to the Powershell window. If I do this instead:
echo 'print "hello, world\n";' | & 'C:\Program Files\Poly ML\
PolyML.exe' > output.txt
then the GUI window doesn't appear, but output.txt is empty. Is this expected?
(With the console build I made following your guidance in this thread, these print to console and output file respectively.)
Chris _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml