delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/19/11:10:41

Date: Sun, 19 Jul 1998 18:09:19 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Pat O'Hara" <pdohara AT execpc DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: stdout - stderr question
In-Reply-To: <6osijo$1b4@newsops.execpc.com>
Message-ID: <Pine.SUN.3.91.980719180551.1021B-100000@is>
MIME-Version: 1.0

On Sun, 19 Jul 1998, Pat O'Hara wrote:

> So being a
> Unix hack I figured I'ld go out to the command line and run gcc -o
> Main.exe Main.c 2> projerr.txt.  This also did not capture the output.

DOS shell doesn't know how to redirect stderr, so it doesn't understand 
2> and its ilk.

You need to use the `redir' program which comes with DJGPP.  It is 
documented in the utils.inf Info file.  For example, the following will 
run gcc with stderr redirected to stdout:

	redir -eo gcc -c foo.c

But I would first try to find out whether there is an option to tell your 
editor that compiler messages are coming from stderr, not stdout.  I 
could hardly believe that GCC is the only compiler which works that way.

- Raw text -


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