Xref: news-dnh.mv.net comp.os.msdos.djgpp:2833 Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!news.msfc.nasa.gov!elroy.jpl.nasa.gov!news.aero.org!news2.aero.org!news2 From: "Brian P. Kasper" Newsgroups: comp.os.msdos.djgpp Subject: Re: Redirecting error messages into a file Date: Wed, 25 Oct 1995 10:20:15 -0700 Organization: The Aerospace Corporation, El Segundo, CA Lines: 43 References: <46gnhl$205 AT wmwap1 DOT math DOT Uni-Wuppertal DOT DE> Nntp-Posting-Host: zul.aero.org To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp Van Schoenepauck 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, [explanation of modifying GO32 environment variable snipped] > Jan Schoenepauck > schoenep AT wrcs3 DOT urz DOT uni-wuppertal DOT de Jan -- I have no problem redirecting stderr to a file using v1.12.maint3. Here's my GO32 info: [c:\kasper\src\test]go32 go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie Lowest version I can run is 1.08 go32.exe usage: go32 [-d {debugger}] [{program} [{options} . . . ]] go32.exe build time was Sun Dec 18 16:36:42 1994 DPMI memory available: 7728 Kb Swap space available: 120260 Kb If I want to redirect the stderr output from 'test.exe' to the file "test.txt" I type this command line: test.exe >& test.txt The ampersand ('&') character indicates that stderr, not stdout, is to be redirected. -Brian Kasper The Aerospace Corporation kasper AT aero DOT org