colorgcc is a perl script to colorize gcc output. I'm collecting random patches and changes
#5 Compare This branch is even with colorgcc:master.
Latest commit ecd2db8 Apr 12, 2012 @johannes Merge pull request #9 from jflemer/master
Minor (config) change to avoid path munging
Failed to load latest commit information.
README Add config and update readme for alternate invocation Apr 2, 2012
colorgccrc.txt Add config and update readme for alternate invocation Apr 2, 2012



Version: 1.3.2

A wrapper to colorize the output from compilers whose messages
match the "gcc" format.

Requires the ANSIColor module from CPAN.


Option 1)
In a directory that occurs in your PATH _before_ the directory
where the compiler lives, create a softlink to colorgcc for
each compiler you want to colorize:

   g++ -> colorgcc
   gcc -> colorgcc
   cc  -> colorgcc

That's it. When "g++" is invoked, colorgcc is run instead.
colorgcc looks at the program name to figure out which compiler to run.

Option 2)
In a directory in your PATH, create the following links to colorgcc:
   color-g++ -> colorgcc
   color-c++ -> colorgcc
   color-gcc -> colorgcc
   color-cc  -> colorgcc
Then override the compiler macros for make, for example:
   make CXX=color-g++ CC=color-gcc

The default settings can be overridden with ~/.colorgccrc.
See the comments in the sample .colorgccrc for more information.


colorgcc will only emit color codes if:

   (1) Its STDOUT is a tty and
   (2) the value of $TERM is not listed in the "nocolor" option.

If colorgcc colorizes the output, the compiler's STDERR will be
combined with STDOUT. Otherwise, colorgcc just passes the output from
the compiler through without modification.

Author: Jamie Moyers <>
Started: April 20, 1999
Licence: GNU Public License