Mail Archives: djgpp/1999/10/20/07:30:47
Rodeo Red <rodeored AT netstep DOT net> wrote in message
news:E74AC92C3E4A9C9C DOT 4E994DD3148FBF35 DOT FA4770D95AB418A2 AT lp DOT airnews DOT net...
> the answer I got from "Johan Venter" <jventer AT writeme DOT com was :
>
> "Redirect it too a file with redir:
> redir -oe -e error.log <command>
> 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
- Raw text -