Page 1 of 1
g++ error logs
Posted: Sun Dec 28, 2003 6:13 pm
by Adek336
Hi all! Is it possible to save all g++ logs, error messages to a file?
Cheers,
Adrian
Re:g++ error logs
Posted: Tue Dec 30, 2003 12:33 am
by proxy
uh, well you can tak ethe stderr of any process in *nix and send it to a file like this:
gcc blah.c -o blah 2> err.log
or better yet, if you have a makefile
make 2> err.log
Re:g++ error logs
Posted: Tue Dec 30, 2003 3:54 am
by Pype.Clicker
proxy wrote:
uh, well you can tak ethe stderr of any process in *nix and send it to a file like this:
gcc blah.c -o blah 2> err.log
or better yet, if you have a makefile
make 2> err.log
note that this usually works for
bash shells, but tends to be misinterpreted by
tcsh (doh)
Re:g++ error logs
Posted: Tue Dec 30, 2003 11:23 am
by Neo
what about windows?
Re:g++ error logs
Posted: Tue Dec 30, 2003 12:07 pm
by Adek336
Thank you! It works very well ;D I tried with >>, || switches, but duh it didn't work. The 2> switch is much better.
Cheers,
Adrian.
Re:g++ error logs
Posted: Tue Dec 30, 2003 1:23 pm
by Pype.Clicker
>>file is for append-to file (i.e. the old content is preserved and the new content goes after it)
man bash and
man tcsh have plenty of information about this ... just search for "redirect" in it.
btw, i found the TCSH error redirector: