console window on demand?

Jim Roy jim@nga.com
Tue Aug 10 16:56:00 GMT 1999


I there any way to get a console window "on demand"?

I have a simple character based program that I am trying to 
port to windows.  It is executed from a third party shell.
Under X, it pops an xterm when it actually writes output, but
does not if no output is produced.  I can't seem to get similar
behavior in windows.

If I compile it as a "console" pgm, ie without -mwindows, then
printf() etc all function as expected and life is good.  Except
that a window pops up on startup, even if no actual output is
produced.

If I compile it as a "GUI" pgm, I lose the gratituitous startup
window, but console I/O has to be done via windows API calls.

Am I missing something here?  Is there a way to use printf() &
friends in a GUI setting?  Or better yet, is there a way to
start a "console" mode pgm without an attached console, and have
it be created with the first I/O opperation?

Thanks for your time,

Jim Roy

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list