Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <005b01c292e3$f39e1410$78d96f83@pomello> From: "Max Bowsher" To: "Peter A. Castro" , "Andrew DeFaria" Cc: References: Subject: Re: impure_ptr/Mingw and Cygwin Date: Sat, 23 Nov 2002 11:32:06 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Peter A. Castro wrote: > Well, for one thing, linking with -lg will pull in cygwin.dll since > /lib/libg.a is a symlink to libcygwin.a. So your program won't be > Cygwin-free, if that's your goal. However, I got it to work with the > following command: > > $ gcc -g foo.c -mno-cygwin -mwindows -o foo -liberty -lmingw32 > $ ./foo.exe > x > $ cat x > Hello World > > If you change 'stderr' to 'stdout' you get "Hello World 2" in the > output too. You'll have to play with carriage control a bit, but > basically it works. Windows doesn't really have the concept of a > stderr file handle, so this behaviour makes sense to me. Hmm.... : $ gcc -g foo.c -mno-cygwin -mwindows -o foo -liberty -lmingw32 $ ./foo.exe > x Hello World 2 $ cat x Hello World How odd. I get the stderr output just fine. Why the -mwindows -liberty -lmingw32 switches? They are unnecessary. Max. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/