Re: crossplatform C++, #ifdef
Re: crossplatform C++, #ifdef
- Subject: Re: crossplatform C++, #ifdef
- From: Jean-Francois Roy <email@hidden>
- Date: Sat, 13 Nov 2004 12:37:15 -0500
On Nov 12, 2004, at 10:15, Eric Forget wrote:
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.
You may also use __MACH__ if you means Mac OS X.
I think the one that's typically used is __MACOSX__
Jeff Roy
--
Co-Founder of MacStorm
Programmer at MacStorm
http://www.macstorm.org
email@hidden
http://www.macstorm.org/bahamut/Jean-Francois.gpgkey
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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