Mail Archives: djgpp/1995/05/04/02:09:06
On Tue, 2 May 1995, Bill Sakoda wrote:
> In a certain program, so many compiler error messages are generated
> that the relevant first few messages scroll off the screen and are
> lost. Redirecting the output does not help: the messages continue to
> come to the screen. Where are the messages being sent to? Can someone
> suggest a fix?
_IF_ you use 4DOS you can type "gcc program.c >&> savefile.err"
This redirects stderr only; use "gcc program.c >& savefile.err" to
save BOTH stderr and stdout (for what it's worth).
I have used a hacked version of "prn2file" this is a PC Mag Util that
save output sent to the printer to a file. I activate this TSR, hit
CTRL-C/PRINT_SCREEN to redirect DOS to the printer and then type gcc.
This does not require you to get 4DOS.
Maybe DOS 6.x can redirect stderr, I dunno, sbeen so long since I'd used it !
Errors often go to stderr, the help, startup info, etc. often goes to stdout.
UNDER DOS these are the screen; with 4DOS (anyways) one can split them; as
is allowed under some versions of NIX.
I use an enormously huge list of switches to activate every possible error
and warning and then knock them out as I run through the second pass (some-
times it takes more than 2 tries, Bill); by saving them to a file and using
TurboC to hold the errors in one window and the '.C' in another I can go
through the whole program, make the fixes and even get TurboC to take a look
at it too ! - Then I go -back- the the _REAL_ .C compiler, of course.
This catches many bugs and shows things not well thought out, quite well.
RDC AT freenet DOT vancouver DOT bc DOT ca UNIX(r) System V Release 4.0 [142.103.106.2]
http://www.freenet.vancouver.bc.ca incoming:// 49 15 00 N 123 07 00 W
- Raw text -