• 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
How to conditionally compile by architecture?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to conditionally compile by architecture?


  • Subject: How to conditionally compile by architecture?
  • From: Stephen Kay <email@hidden>
  • Date: Thu, 18 Oct 2012 13:38:35 -0400
  • Thread-topic: How to conditionally compile by architecture?

I've finally gotten this old CodeWarrior PPC app I'm porting to the point of
being fully imported into Xcode 2.5, and building successfully on PPC.

I've now moved to an Intel machine to start working on making it run on
Intel.

Assuming I want to maintain backwards compatibility with PPC (for the
moment, anyway...), how do you identify the architecture in order to do
conditional compiling for one or the other? What's the define? I.e.:

#ifdef INTEL_ARCHITECTURE
    // do byte-swapping
#endif

Or alternately,

#ifdef PPC_ARCHITECTURE
    // do old way
#endif

Thanks,
- Stephen

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma-Lab :: developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



 _______________________________________________
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

  • Follow-Ups:
    • Re: How to conditionally compile by architecture?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Debug without building in Xcode 4?
  • Next by Date: Re: How to conditionally compile by architecture?
  • Previous by thread: Re: assistant editors at *bottom*. I said *bottom*!
  • Next by thread: Re: How to conditionally compile by architecture?
  • Index(es):
    • Date
    • Thread