• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I do color text output?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I do color text output?


  • Subject: Re: How can I do color text output?
  • From: Ellie Baker <email@hidden>
  • Date: Mon, 16 Feb 2009 11:28:17 -0500
  • Thread-topic: How can I do color text output?

Title: Re: How can I do color text output?
Thank you.  You were right that the new project had a bunch of extra stuff in Targets and the old one had very little.  When I removed the main.cp file from Targets, my new project built successfully.  But why did the Targets get set up differently?  I must have done something different when I set up and created the two projects, but I don’t know what.  The Targets seem to show up in some automated fashion — I didn’t do anything to create them (I thought).
I sure appreciate the help!
Ellie


On 2/16/09 11:12 AM, "Jean-Daniel Dupas" <email@hidden> wrote:


Probably because your new project's target contains the main.cpp file and the old project's target does not.
Xcode does not build all files present in the project, but all files that are in the "Compile Sources" build step of your target.

Anyway, you can remove the main.cpp file from your project if you do not use it (that will remove it from all targets).



Le 16 févr. 09 à 17:03, Ellie Baker a écrit :

Thank you to those who sent suggestions for doing color text output.  Having my C++ program create a simple RTF file worked very well and I did not need to use cocoa.
 However, now I have a new problem.  I tried creating a new project/program that I thought was identical to my original C++ program (but with a different name).  The original builds and runs just fine, but the new one is failing with “duplicate symbol _main...”  Can anyone tell me why this might be happening?  Both projects seem to have a file main.cpp (which was generated automatically), which contains a main function.  And both projects have .cpp files that I created that have a main function.  Why does one build successfully and the other fail?
 
 I’m so confused!
 Ellie
 
 
 On 2/15/09 1:04 PM, "Lennart Thelander" <email@hidden> wrote:
 
 
Hello,
 
 I don’t think you can color the console output.
 I think the simplest solution would be to create an RTF file:
 http://en.wikipedia.org/wiki/Rich_Text_Format
 http://www.pindari.com/rtf1.html
 
 Regards
 Lennart Thelander
 
 
 On 09-02-15 18.36, "Ellie Baker" <email@hidden> wrote:
 
 
I am new to Xcode and was wondering if someone could advise me about the best approach to writing a simple program that outputs text in color.  It could be output to a file or to the console — I just need to be able to print the color output.  For example, how can I write “hello world” with the characters in different colors?  Can I do this using C++ and the console for output?  Or must I use cocoa (if so, how?)?  Or is there some simpler option?  I only need to use a few basic colors (nothing fancy).
 Thanks for any help!
 Ellie
 
 


_______________________________________________
 Do not post admin requests to the list. They will be ignored.
 Xcode-users mailing list      (email@hidden)
 Help/Unsubscribe/Update your Subscription:
 
 This email sent to email@hidden
 

 


   _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: How can I do color text output? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: How can I do color text output?
  • Next by Date: header files for g++-4.2
  • Previous by thread: Re: How can I do color text output?
  • Next by thread: Re: How can I do color text output?
  • Index(es):
    • Date
    • Thread