From: "Johan Venter" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Read Me Third: A Short FAQ List Lines: 54 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Wed, 20 Oct 1999 11:57:23 +1000 NNTP-Posting-Host: 203.40.84.164 X-Trace: newsfeeds.bigpond.com 940398920 203.40.84.164 (Wed, 20 Oct 1999 15:55:20 EST) NNTP-Posting-Date: Wed, 20 Oct 1999 15:55:20 EST Organization: Telstra BigPond Internet Services (http://www.bigpond.com) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Rodeo Red wrote in message news:E74AC92C3E4A9C9C DOT 4E994DD3148FBF35 DOT FA4770D95AB418A2 AT lp DOT airnews DOT net... > the answer I got from "Johan Venter" > "Redirect it too a file with redir: > redir -oe -e error.log > So, for a simple compile example: > redir -oe -e error.log gcc -o test.exe test.c > The output will be in error log." I hope I haven't caused any confusion, it's been a while since I used redir, so I may have muddled the command line options (I thought above would work though, stdout > stderr, then stderr > error.log). > > I got it to work when I compiled a file but I have no idea what stdout and stderr > are. Never heard of em. What are they ? They are the standard C++ file handles for input (stdin), output (stdout) and error reporting (stderr). They are basically a FILE *, but they are redirected to hardware devices by default. stdin comes from the keyboard, stdout and stderr go to the screen (by default). So, when you say printf("Hello World\n"); in your program, you're actually printing the string to stdout. > C:\djgpp>redir -oe -e error.log unzip32 djdev202 > Bad command or file name > > C:\djgpp>redir -e error.log -oe unzip32 djdev202 > Bad command or file name > > C:\djgpp> Do you actually have redir in your DJGPP/bin directory? And the DJGPP/bin directory on your PATH? > Not in a way that I can understand. I did read > http://www.delorie.com/djgpp/doc/utils/utils_7.html > about redir seven or eight times and I'm still lost. I'm hoping once I am able to > get things working maybe I can learn more by experimentation, but I haven't > gotten to that point yet. DJGPP comes with offline documentation as well in the form of the Info program. Type info redir at the prompt for the redir docs, or just info for a directory of docs. -- Johan Venter ICQ 3643877 - jventer AT writeme DOT com The TPU DJGPP Interest Group - http://surf.to/djgppig The RSXNTDJ 1.5 HOWTO - http://surf.to/rsxntdj