www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/24/13:14:48

Xref: news-dnh.mv.net comp.os.msdos.djgpp:2796
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!EU.net!sun4nl!cs.vu.nl!rjvdboon
From: rjvdboon AT cs DOT vu DOT nl (Boon van der RJ)
Subject: Re: Redirecting error messages into a file
Nntp-Posting-Host: sloep64.cs.vu.nl
References: <Pine DOT SGI DOT 3 DOT 91 DOT 951018130224 DOT 13222A-100000 AT tower DOT york DOT ac DOT uk> <46gnhl$205 AT wmwap1 DOT math DOT Uni-Wuppertal DOT DE>
Sender: news AT cs DOT vu DOT nl
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Tue, 24 Oct 1995 08:42:12 GMT
Lines: 31
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019