Mail Archives: djgpp/1997/01/21/02:49:29
"John M. Aldrich" <fighteer AT cs DOT com> wrote:
>Gautam N. Lad wrote:
>>
>> QUESTION:
>> How do I direct the errors/warnings that are created after compile,
>> to a file? I tried REDIR, but didn't have a clue on how to use it.
>> Since my HD space is limited, I got rid of the DOCs.
>
>redir -o err -eo gxx -o tb.exe tb.cpp window.cpp -lgrx20
>
>This redirects both stdout and stderr to the file called "err". redir
>has a bunch of similar options; just type "redir" to see them.
Sorry men, but I think using redir isn't too comfortable (but it's a
working solution, of couse), and using DOS-port of BASH is easy only for
persons with previous experiense in UNIX ( not my case :~( )
Probably the best solution is to rewrite startup code in such a way, that
it will:
A) pre-check command line parameters, and pass to main program only
part before ">", ">&" and "<" combinations
B) perform the redirection of output from stdout (and stderr for ">&")
to a file, mentioned after ">" or ">&" operation.
C) check for "<" sign and redirect file after this symbol to stdin.
Well, it's only an idea, may be very stupid... Friends, what are you
thinking about this topic? At least it will be more natural, then
'redir' way. Sincerly saying, I think that not many users in the world
know and have 'redir.exe' on their PC, but alot of them use programs,
builded with DJGPP. And many of them for shure will try something like
"someprog.exe /? > info.txt" to get short instructions in text file
(it happened to me, then I leached fMSX (MSX is a 8-bit computer from my
childhood) emulator by Marcel De Kagel, compiled with DJGPP 2.0.
- Raw text -