• 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: predefined DEFINE for Debug or Release build?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: predefined DEFINE for Debug or Release build?


  • Subject: Re: predefined DEFINE for Debug or Release build?
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 06 May 2008 10:19:18 -0700

On May 6, 2008, at 9:36 AM, "R.L. Grigg" <email@hidden> wrote:

On May 6, 2008, at 7:34 AM, Jean-Daniel Dupas wrote:

Le 6 mai 08 à 16:05, email@hidden a écrit :

Hi,

Does Xcode 3.0 have pre-defined C define to check Release build or Debug build?

If not, how can I add my define on Xcode configuration?
I tried on Xcode configruation menu, but it can be has C define like -DMY_DEFINE=1.


I'm building Kext module using XCode 3.0

Thanks in advance,
Woojung

What you want is a preprocessor macro.

Open the target build settings (or the projet build setting if you want projet wide settings) by double clicking the corresponding item (the target or the projet item)
Choose the "build" tab to show all build settings.
Choose the "configuration" you want to update (release, debug, ...).


And then search for "Preprocessor Macros" in the build settings list.

If you want something like -DMY_DEFINE=1, just enter MY_DEFINE=1 (without the -D)

With respect to the broader question, does Xcode 3.0 set its own define when doing a debug build vs a release build? I would like my code to key off the intrinsic Xcode build type automatically without setting a define. Looking at the build log it appears it doesn't.

It does not. At this point there's too much diversity in configuration names and developers' existing macros for us to impose this on projects unilaterally.


Chris _______________________________________________
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: 
 >predefined DEFINE for Debug or Release build? (From: email@hidden)
 >Re: predefined DEFINE for Debug or Release build? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: predefined DEFINE for Debug or Release build? (From: "R.L. Grigg" <email@hidden>)

  • Prev by Date: Re: predefined DEFINE for Debug or Release build?
  • Next by Date: Re: Inspecting Obj-C method parameters from gdb
  • Previous by thread: Re: predefined DEFINE for Debug or Release build?
  • Next by thread: Setting up target dependency
  • Index(es):
    • Date
    • Thread