• 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: Getting build flag setting in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting build flag setting in code


  • Subject: Re: Getting build flag setting in code
  • From: Kai-Mikael Jää-Aro <email@hidden>
  • Date: Mon, 6 Aug 2007 11:18:02 +0200


parag vibhute kirjoitti 2007-08-06 kello 11:13:

Hi,

I have developed a Cocoa application.
My requirement is to pass an argument while building an application. Based on that argument's value, certain part of my code will be compiled otherwise it will be ignored (like #defined).
I thought one of way is to add a new build setting ( u can say its like variable) in build pane of xcode & to get that setting's value in code so that based on that value, certain part of my code will be compiled otherwise ignored. Am I in right direction? If yes, how to retrieve that variable's value in code?

You can define a variable in the compiler command line with -Dvar (e g, use the Additional Compiler Flags) and then test for this with #ifdef in the code as usual.





_______________________________________________ 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: 
 >Getting build flag setting in code (From: "parag vibhute" <email@hidden>)

  • Prev by Date: Getting build flag setting in code
  • Next by Date: Re: Getting build flag setting in code
  • Previous by thread: Getting build flag setting in code
  • Next by thread: Re: Getting build flag setting in code
  • Index(es):
    • Date
    • Thread