Mail Archives: djgpp/1995/10/24/13:14:48
Van Schoenepauck (schoenep AT wrcs1 DOT urz DOT uni-wuppertal DOT DE) wrote:
: Shawn Hargreaves (slh100 AT york DOT ac DOT uk) wrote:
: : I have a seemingly simple problem. I want to redirect the error messages
: : generated by djgpp into a file, so that my text editor can read them and
: : thus automatically locate the errors in the source files. The problem is,
: : when I compile with a command like 'gcc test.c > errors', the output
: : doesn't get redirected properly.
: The reason for this is that gcc writes its error messages to stderr, which,
: though being displayed on screen by DOS, cannot be redirected to a file
: (at least that's what I experienced, using djgpp 1.12m4). Good news is,
: there is a way around this: There is an option to the extender go32 (which
: gcc uses), telling the extender to redirect everything written on stderr
: to stdout. The command is "2r1", which has to be appended to the go32
: options in the GO32 environment variable (probably set in your AUTOEXEC.BAT;
: if not, create it), e.g.
: set GO32=[your options] 2r1
: Now all output to stderr is redirected to stdout, which in turn CAN be
: redirected to a file as usual (e.g. gcc file.c [options] >output).
: Hope that helped,
Or you can use 4dos an execute: 'gcc test.c >&>errors
: Jan Schoenepauck
: schoenep AT wrcs3 DOT urz DOT uni-wuppertal DOT de
Robert van der Boon
--
rjvdboon AT cs DOT vu DOT nl
- Raw text -