Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-13-2012, 07:06 AM   #1
Senior Member
Registered: May 2007
Posts: 1,257

Rep: Reputation: 44
How to make gcc output with color?


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?
Old 01-13-2012, 07:23 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Have you tried a google search for "gcc color output"?
Old 01-13-2012, 07:24 AM   #3
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Is it some other program that treats gcc output?
Yes, usually it's colorgcc. Unfortunetly, gcc itself not colorizes its output.
1 members found this post helpful.
Old 10-09-2016, 07:25 AM   #4
Senior Member
Registered: May 2007
Posts: 1,257

Original Poster
Rep: Reputation: 44
Another old thread ending. The final solution that I found and used is gccfilter (see this thread).
Old 10-10-2016, 06:03 PM   #5
LQ Newbie
Registered: Jun 2015
Distribution: CentOS,Debian,Ubuntu
Posts: 19

Rep: Reputation: Disabled
GCC 4.9+ support color output

If you use GCC 4.9 or later, color output is supported:

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'
1 members found this post helpful.


color, colors, gcc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
why gcc make warning message dont show color font? wwqly12 Linux - Software 2 03-19-2009 04:55 PM
why gcc make error/warning messages dont show color font wwqly12 Linux - Software 1 03-18-2009 01:48 PM
Color registration bars on output: Lexmark C510 Color Laser printer spud_linux Linux - Hardware 2 10-06-2008 12:46 PM
Is the output of (chapter 6)gcc-3.3.3 make -k check correct?????? linuxbh Linux From Scratch 1 09-05-2004 08:37 AM
Changing the color of ls output? exitsfunnel Linux - Newbie 1 02-19-2004 11:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration