LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...

Notices

Reply
 
LinkBack Search this Thread
Old 05-28-2005, 12:01 PM   #1
pttcoco
LQ Newbie
 
Registered: Sep 2004
Location: France
Posts: 10

Rep: Reputation: 0
colorful g++


In some pc, when I compile with g++ in a Konsole, the output messages are coloured : error in red, warning in bleu, etc ...
But at home when I compile the same file, it does'nt have any color. Does anyone know the option to change to have coloured message ?
At home I used FC3, gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) with Konsole 1.4.1
 
Old 05-30-2005, 11:55 AM   #2
pttcoco
LQ Newbie
 
Registered: Sep 2004
Location: France
Posts: 10

Original Poster
Rep: Reputation: 0
With this code :

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
const char *const green = "\033[0;40;32m";
const char *const normal = "\033[0m";
int i;
fprintf(stderr,"%shello %sWorld\n",green,normal)
}

When I compile, I get this :
http://mhtrinh.free.fr/snapshot.jpeg
 
Old 05-30-2005, 01:20 PM   #3
pttcoco
LQ Newbie
 
Registered: Sep 2004
Location: France
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks to all who read and try to respond to this thread.
I found the solution in an another forum.
I juste have to install the package colorgcc found at : http://www.mindspring.com/~jamoyers/software/colorgcc/
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Colorful File Names in Konsole drumstick Linux - Newbie 4 05-20-2005 12:03 AM
Question: How to do colorful boot like in Knoppix SeSchae Debian 3 10-19-2003 04:55 AM
KNOPPIX Colorful Console -=bcc=-E-nigma Linux - Software 4 05-01-2003 11:43 AM
How can i set colorful login massage bigface Linux - General 1 06-30-2002 09:34 AM


All times are GMT -5. The time now is 07:59 AM.

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