Mail Archives: djgpp/1997/08/09/21:23:54

From: Weiqi Gao <weiqigao AT a DOT crl DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Capturing DJGPP mesages to a file
Date: Thu, 07 Aug 1997 19:49:47 -0500
Organization: Spectrum Healthcare Services
Lines: 46
Message-ID: <>
References: <33EA2692 DOT 395D AT popd DOT ix DOT netcom DOT com>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Yojimbo wrote:
> I'm very new to DJGPP, and I've been trying to find a way to capture the
> messages to a file. After a lot of dinking around, I've got a way that
> works very nicely, so I thought I'd pass it along.  It involves the use
> of a very nice utility called SCRIPT.
> First, get a copy of the SCRIPT11.ZIP distribution file. It is available
> from:
> Extract the executable file and store it in a directory that is on your
> Now prepare a batch file which will invoke script and call another batch
> file from script. I used something like this:
>         script -f c:\misc\err.log command /c call maker %1
> I named this batch file mkr.bat, and when I call it, I pass the name of
> my source file WITHOUT the .cc extension. For example, if I have a
> source file name SOURCE.CC I would type MKR SOURCE at the prompt. The
> batch file saves a lot of typing.
> MAKER.BAT does the real work. It looks something like this:
>         @echo off
>         gcc -o %1.o -c -I. -g
>         gxx -o %1 %1.o %djgpprun%/djgpp/lib/stharch.a
> You'll want to make sure you use fully qualified file names that reflect
> the way your system is set up.
> The gcc and gxx commands are based on files accompanying the book "Who's
> Afraid of C++" by Steven Heller.
> I hope this is useful.

Or you can use the redir.exe utility that comes with DJGPP.  Simply say
  redir -o output.log -e error.log    make all (or any other command)
and stdout will be redirected to output.log while stderr will be
redirected to error.log.

Weiqi Gao
weiqigao AT a DOT crl DOT com

- Raw text -

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