From: ben <be...@tt...> - 2008-03-11 13:36:10
|
Dave, Thank you very much; you have it exactly right. It works fine now. The FAQ at http://www.mingw.org/mingwfaq.shtml#faq-ridconsole had confused me: #How to remove DOS command windows? # #In the link step add a -mwindows switch to the command line. so I thought it was a linker switch. I mention this here in case others have this problem and search on the quoted text. Regards, -ben. Dave Korn wrote: > Earnie Boyd wrote on $TODAY: > > >>Quoting ben <be...@tt...>: >> >>> [ ... ] it is a 'console' program instead of a >>>'windows' program (I am a unix guy; I don't know the right windows >>>terminology-- >> > > 'console' and 'windows' are exactly the right terms! > > >>>The FAQ indicates that I should specify the -mwindows option to the >>>linker, but when I invoke: >>> >>>/usr3/xgcc-win32/bin/i386-mingw32-gcc -Wl,-mwindows -o hello.exe hello.c >>> >>>I get: >>> >>>ld: unrecognised emulation mode: windows >>>Supported emulations: i386pe >>> >>>I have tried to find a way to build an ld with emulation support for >>>'windows' but have so far failed to do so. >> > > Tree. Wrong one. Barking up. Stick. Wrong end of the. Getting hold > of. Herring. Red. Goose chase. Wild. > > >>>Can anyone tell me how to build such an 'ld', or how otherwise to cross >>>compile an application that does not need to be launched from a console? >>> >> >>I suspect your GCC specs aren't quite correct. Under *link: >>you should see: >> >>%{mwindows:--subsystem windows} %{mconsole:--subsystem console} >> >>So instead of -mwindows you could add a -wl switch to GCC to pass the >>subsystem switch to the linker. > > > > Surely the problem is that -mwindows is a flag for the compiler, not the > linker, and the original commandline would have been correct if it had just > omitted the "-Wl" from "-Wl,-mwindows" ? > > > > cheers, > DaveK |