Fedora Linux Support Community & Resources Center
  #1  
Old 20th March 2009, 11:52 PM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
Installing colorifer or gcc-color?

Hey Guys,

This is my first time at using Linux and things have gone fairly smoothly until now, I am using Fedora 10 and I want to install either gcc-color or colorifer so that when I compile my programs on the command line any errors I get will be displayed in color instead of plain old black and white.

Can you please show me the method to installing either once of these programs.

Any help would be appreciated.

Thanks
Qwe

Last edited by qwe; 20th March 2009 at 11:53 PM. Reason: Forgot to mention
Reply With Quote
  #2  
Old 21st March 2009, 12:05 AM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 4,201
Download the source and configure from: http://schlueters.de/colorgcc.html "Source" as the Perl script it is.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #3  
Old 21st March 2009, 12:16 AM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
Should I just copy the file and run it, or do I need to be in a particular folder first?
Reply With Quote
  #4  
Old 21st March 2009, 12:19 AM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 4,201
Both the script and example config file are very well commented with usage instructions. But I'd put it in ~/bin or /usr/bin so that it becomes available from everywhere.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #5  
Old 21st March 2009, 12:42 AM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
I think I followed the instructions downloaded and copied the files to ~/bin but it does not seem to be working. Isn't their an RPM package I could install instead?
Reply With Quote
  #6  
Old 21st March 2009, 12:59 AM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 4,201
What was the error message you got when you tried to run it?

http://lmgtfy.com/?q=colorgcc for package.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #7  
Old 21st March 2009, 01:08 AM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
Its not so much that I get an error as I need to type in colorgcc to compile the program instead of gcc, and if I type in colorg++ I get an error that says colorg++ command not found.
Reply With Quote
  #8  
Old 21st March 2009, 01:09 AM
leigh123linux Online
Retired Administrator
 
Join Date: Oct 2006
Posts: 22,112
http://www.console-colors.de/index.p...lors.Downloads


.
__________________
https://admin.fedoraproject.org/pkgdb/users/packages/leigh123linux

https://badges.fedoraproject.org/user/leigh123linux
Reply With Quote
  #9  
Old 21st March 2009, 01:25 AM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 4,201
Quote:
Originally Posted by qwe View Post
Its not so much that I get an error as I need to type in colorgcc to compile the program instead of gcc, and if I type in colorg++ I get an error that says colorg++ command not found.
It says it's not found because there is no such script/ program. Read the instructions in the file and you see that you have to symlink to your compilers and then run g++ like you would normally. But instead of running g++ directly it runs colorgcc which does its magic and passes control back to g++.

It's all explained in the file very clearly.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #10  
Old 21st March 2009, 01:30 AM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
Thanks, but I am still having the same problem compiling I keep having to use colorgcc to compile instead of gcc.
Reply With Quote
  #11  
Old 21st March 2009, 01:41 AM
qwe Offline
Registered User
 
Join Date: Mar 2009
Posts: 6
How would I create a symlink? I just did this:
g++: /usr/bin/g++
gcc: /usr/bin/gcc
c++: /usr/bin/c++
cc: /usr/bin/cc

also can should the file extension remain .txt or should I change it to .pl?
Reply With Quote
  #12  
Old 21st March 2009, 09:44 AM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 4,201
Do this:

- Download the colorgcc perl script
- Save it somewhere safe.
- Copy it to ~/home/username/bin (to start with) (cp colorgcc.1.3.2.txt ~/bin/)
In terminal do:
Code:
cd ~/bin
mv colorgcc.1.3.2.txt colorgcc
chmod 0755 colorgcc
Then move to directory where your C++ source code is and run
Code:
colorgcc [your normal compiler options]
To make sure everything works, break your code and you'll see pretty coloured error messages.
You can then use the sample config file to customise your message colours (download and save it in same place where the original Perl script, then use the cp command to copy it your your $HOME (cp colorgccrc.txt ~/.colorgccrc)

Note that the dot in front of the newly named colorgccrc makes it "hidden", you will see it with "ls -a" command.

Once you're happy, you can move ~/bin/colorgcc to /usr/bin/ to make it available to everyone.
Attached Thumbnails
Click image for larger version

Name:	colorgcc.gif
Views:	150
Size:	18.3 KB
ID:	17731  
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
Reply

Tags
colorifer, gcc, gcc-color

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'ls -l | more' with color? Karmaflute Using Fedora 6 19th May 2008 02:14 AM
How to set vi color? youhaodeyi Using Fedora 1 21st April 2008 10:31 PM
Installing color mangement (ICC) profiles for LCMS Thetargos Using Fedora 0 13th February 2008 06:14 AM
16-bit color vs. 32-bit color depth cnayak Using Fedora 6 11th August 2006 03:07 AM


Current GMT-time: 10:47 (Sunday, 20-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat