Re: I need to know which compiler or environment my code is being compiled in . . .
Re: I need to know which compiler or environment my code is being compiled in . . .
- Subject: Re: I need to know which compiler or environment my code is being compiled in . . .
- From: Chris Espinosa <email@hidden>
- Date: Fri, 7 Aug 2009 14:50:42 -0700
On Aug 7, 2009, at 1:31 PM, Michael A. Crawford wrote: Hi, I'm looking for information on Xcode or the preprocessor that would indicate whether or not my code is being compiled for a non Mac GNU target or Mac OS X or iPhone OS.
What are the relevant defines and where can I find them in the documentation? Apparently I'm not using the correct keywords in my Google search or Xcode's documentation search window.
The compiler sets certain predefined macros based on its invocation flags, and others are derived in TargetConditionals.h
The specific droids you're looking for:
TARGET_OS_* These conditionals specify in which Operating System the generated code will run. The MAC/WIN32/UNIX conditionals are mutually exclusive. The EMBEDDED/IPHONE conditionals are variants of TARGET_OS_MAC.
TARGET_OS_MAC - Generate code will run under Mac OS TARGET_OS_WIN32 - Generate code will run under 32-bit Windows TARGET_OS_UNIX - Generate code will run under some non Mac OS X unix TARGET_OS_EMBEDDED - Generate code will run under an embedded OS variant of TARGET_OS_MAC TARGET_OS_IPHONE - Generate code will run under iPhone OS which is a variant of TARGET_OS_MAC.
|
_______________________________________________
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