Hi all! Is it possible to save all g++ logs, error messages to a file?
Cheers,
Adrian
g++ error logs
Re:g++ error logs
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
gcc blah.c -o blah 2> err.log
or better yet, if you have a makefile
make 2> err.log
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:g++ error logs
note that this usually works for bash shells, but tends to be misinterpreted by tcsh (doh)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
Re:g++ error logs
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.
Cheers,
Adrian.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:g++ error logs
>>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:
man bash and man tcsh have plenty of information about this ... just search for "redirect" in it.
btw, i found the TCSH error redirector:
Code: Select all
command >output.txt >&error.log