Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: "Ed Federmeyer" Newsgroups: scea.yaroze.beginners Subject: Re: How can I output gcc error list to a file? Date: Fri, 23 Oct 1998 21:27:28 -0500 Organization: Ed Federmeyer Lines: 33 Message-ID: <70rdag$dnq8@scea> References: <70mndd$7i7@chuka.playstation.co.uk> <70osit$cv311@scea> NNTP-Posting-Host: charlie.cns.iit.edu X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Steve Tolin wrote in message <70osit$cv311@scea>... >There is a way to do this very easily.... but I haven't done it in so long >that I can't remember the syntax.. > >I'll check some of my earlier notes amnd hopfully have an answer soon... > >Anyone else??? > > >Steve Davison wrote in message <70mndd$7i7@chuka.playstation.co.uk>... >>Now this may seem pretty obvious to most people but when I compile source >>code at the dos prompt how do I redirect the output to a file or a printer. >>I know this can be done as I remember it from my COBAL days, unfortunately >>my COBAL days were probably the last time I used dos.(about 7 years ago) >> Under Unix (traditional shells anyway) and Windows NT you use: gcc main.c > errors.log 2>&1 The "2>&1" means, make file descriptor 2 (stderr) go to the same place as file descriptor 1 (stdout). This won't work for Windows 95 or 98. There is a program from the DJGPP port of GNU C to the PC called "redir", which you can use to redirect the output of stderr in all kinds of useful ways. You might try a web search for DJGPP, and grab the "binutils" archive. (Might as well grab the whole thing though, it's an awesome "free" compiler and stuff.) EdF