Colored output for gcc and friends

Tired of using search to find the errors in your GCC output?

Hunting down errors in C and C++ is hard enough and so is hunting down the error message in the compiler output. A few years ago (actually more than ten) Jamie Moyer sat down and wrote a nice Perl script that parses the output so that it creates colored output on a colored terminal.

Unfortunately the only location where to get this script right now is from Johannes Schlüter’s website.

Terminal with colored gcc output

And what should I say more – this looks very pretty. By the way the nice Terminal theme came from InfiniteRed – readable black theme, nice.

Tags: , , ,

Related Posts (auto generated):

4 Comments

  • I wonder if there is a terminal that simply colors all stderr output red? That would probably work most of the time with well behaving UNIX apps…

  • @Martin en Neukoelln
    “the only location” – well, apt-get install colorgcc did it’s work. But you are right, it’s not maintained nor hosted upstream anymore. I once used it, and really liked it. It only did not play well with gcc versions other than the english one and with autoconf, iirc.

    @Martin Probst
    I am sure you can do it in other shells as well. In zsh it’s fairly easy:
    http://en.gentoo-wiki.com/wiki/Zsh#Colorize_STDERR
    However I don’t recommend it. A lot of programs “misuse” stderr for all info that should not be in stdout if stdout is piped to another program. So you’ll get a lot of red text although it’s not errors ;-)

  • @Martin The clear advantage is: Warnings are yellow, errors are red and surely there is no stdwarn ;)

    @Silvan – The only question is: Who really uses ZSH?

  • That’s right Silvan, stderr is of course used for all messages that are not part of the regular program output, and they rightfully do.

Einen Kommentar hinterlassen

Commenting rules

  • Try to keep your comments as relevant as possible.
  • No HTML/JavaScript/BBcode.
  • Don't be abusive: No racism, homophobia or any other nastiness.
  • Feel free to express your opinion, but do so in an eloquent way.

If you do not respect these rules your comments may be edited or even deleted.