LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to make gcc output with color? (http://www.linuxquestions.org/questions/linux-software-2/how-to-make-gcc-output-with-color-923584/)

dedec0 01-13-2012 07:06 AM

How to make gcc output with color?
 
Hello,

sometimes I have seen the output of gcc with colors. Now I have a system that doesn't do this, and I would like to make it so.

But how? 'man gcc' says nothing. Is it some other program that treats gcc output?

bigrigdriver 01-13-2012 07:23 AM

Have you tried a google search for "gcc color output"?

troop 01-13-2012 07:24 AM

Quote:

Is it some other program that treats gcc output?
Yes, usually it's colorgcc. Unfortunetly, gcc itself not colorizes its output.

dedec0 10-09-2016 07:25 AM

Another old thread ending. The final solution that I found and used is gccfilter (see this thread).

xuhdev 10-10-2016 06:03 PM

GCC 4.9+ support color output
 
If you use GCC 4.9 or later, color output is supported: https://gcc.gnu.org/onlinedocs/gcc-4...t-Options.html

For lazy people: add the following to your bashrc:

export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'


All times are GMT -5. The time now is 09:50 AM.