-mwindows and --Wl,subsystem,windows
Andy Koppe
andy.koppe@gmail.com
Sun Mar 29 20:47:00 GMT 2009
Dave Korn:
> Andy Koppe wrote:
>> According to this post on the gcc mailing list a few years back, gcc's
>> -mwindows option should imply --Wl,subsystem,windows:
>>
>> http://gcc.gnu.org/ml/gcc-help/2004-01/msg00225.html
>
> Yep, it still does.
Ah, you're right. I seem to have confused myself about this while
grappling with MinTTY issue 39: "Command shell window remains open in
Windows 7 Beta".
It would appear that something's changed in how Windows deals with
Cygwin applications. The fact that MinTTY actually is compiled as a
"windows" subsystem app after all makes this even more curious.
I'm finding that MinTTY itself causes a console to open without any
output that would necessitate it. That can be got rid of with
FreeConsole(), but then the command invoked by MinTTY (using forkpty()
and execve()) opens a console anyway. Apart from that, things work
fine though.
rxvt uses the hack below to just hide any console window. Perhaps I
should just go with that, but I'm a bit concerned that it might end up
hiding the wrong console, or that the console might reappear for some
reason anyway.
Andy
char app_name[40];
sprintf(app_name, "rxvt%08x", (unsigned int)GetCurrentThreadId());
...
SetConsoleTitle( app_name );
while ((conwin = FindWindow( NULL, app_name))==NULL)
Sleep( 40 );
ShowWindowAsync(conwin, SW_HIDE);
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list