From: kagel AT quasar DOT bloomberg DOT com Date: Thu, 26 Sep 1996 11:52:24 -0400 Message-Id: <9609261552.AA21530@quasar.bloomberg.com > To: jmarco AT cnct DOT com Cc: djgpp AT delorie DOT com In-Reply-To: <52cf3v$9qr@news2.cnct.com> (jmarco@cnct.com) Subject: Re: Redirecting gcc output? Reply-To: kagel AT dg1 DOT bloomberg DOT com Errors-To: postmaster AT ns1 From: jmarco AT cnct DOT com (John Panettiere) Newsgroups: comp.os.msdos.djgpp Date: Wed, 25 Sep 1996 23:31:03 GMT Organization: The Internet Conection Lines: 13 Nntp-Posting-Host: nj-dialup208.cnct.com X-Newsreader: Forte Free Agent 1.0.82 Dj-Gateway: from newsgroup comp.os.msdos.djgpp Content-Type: text Content-Length: 320 I'm sure this is a very simple thing, but I'm having trouble finding the answer. I generally like to redirect output to a text file when I compile. The standard '>' redirect doesn't seem to work when I use gcc. How can I redirect the list of warnings/errors produced by gcc to a text file? From the FAQ: **Q*: I want to read all the error messages that GCC throws on me, but they are so many that I can't keep up. How can I redirect them to a file?* **Q*: When I add `-v' to the GCC command line, how can I put all the voluminous output into a file, so I don't miss anything when reporting a problem?* **Q*: I have this nifty graphics program which bombs from time to time, but the registers and traceback info is hidden by the graphics display. How can I see it?* *A* : There are several alternatives: a. You can use a shell smarter then `COMMAND.COM', such as `4DOS', which knows how to redirect standard error stream to a file. 4DOS is shareware and can be found on SimTel, e.g. ftp://ftp.coast.net/SimTel/msdos/4dos/. b. You can also run your program under any one of the programs which save the output of programs they spawn in a file. I suggest using a program called `SCRIPT', which is similar to its Unix namesake. It has an advantage of saving everything which goes to screen *and* showing it on the screen at the same time. You can find SCRIPT on SimTel, e.g. ftp://ftp.coast.net/SimTel/msdos/screen/script11.zip. NOTE THIS ONE: c. Or you can use the `REDIR' program which comes with DJGPP. It also redirects standard output and/or standard error to a file, but you don't get a chance to look at the output while the program runs. Check the Info docs for options. Gcc writes to stderr which DOS cannot redirect, but REDIR can. -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats