• 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: crossplatform C++, #ifdef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crossplatform C++, #ifdef


  • Subject: Re: crossplatform C++, #ifdef
  • From: Phillip Mills <email@hidden>
  • Date: Fri, 12 Nov 2004 07:56:05 -0500

On Nov 11, 2004, at 11:48 PM, Danny Swarzman wrote:

I'm working an a crossplatform C++ project. How I conditionally compile for Macintosh?

Something like:

#ifdef Macintosh
	do mac stuff
#endif

But 'Macintosh' isn't the right symbol, is it? What is?

You may want __APPLE__ but the best way to make a decision is to examine the output from 'cpp -dM <file>'. That dumps a list of the pre-defined macros that are currently recognized and it's sometimes better to pick a more specific symbol like __POWERPC__ or __BIG_ENDIAN__ depending on the actual reason for your #ifdef.


........................
Phillip Mills
Multi-platform software development
(416) 224-0714

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


  • Follow-Ups:
    • Re: crossplatform C++, #ifdef
      • From: Eric Forget <email@hidden>
References: 
 >crossplatform C++, #ifdef (From: Danny Swarzman <email@hidden>)

  • Prev by Date: No DO connection when tool invoked via SSH
  • Next by Date: Use of long long's in a Cocoa program?
  • Previous by thread: crossplatform C++, #ifdef
  • Next by thread: Re: crossplatform C++, #ifdef
  • Index(es):
    • Date
    • Thread