Determining which SDK I'm compiling against
Determining which SDK I'm compiling against
- Subject: Determining which SDK I'm compiling against
- From: Andrew Thompson <email@hidden>
- Date: Wed, 15 Sep 2004 23:59:48 -0400
Hi all,
I want to use a constant (enum value) that's only available on Panther.
Something like this
#include <Appearance.h>
#ifdef PANTHER_OR_LATER //how does one do this?
FOO=kThemeResizeUpCursor
#else
FOO=19
#endif
The point here is this code may be compiled on Panther against the 10.3
SDK or on 10.2 against the Jaguar SDK.
If we're *compiling* on Panther, we use the real constant, if we're
compiling on Jaguar we substitute '19'.
So far I've found a dozen ways to handle RUNTIME conditional inclusion
of things. I can use the appkit version numbers, gestalt, weak linking
and/or availability macros to conditionally link function symbols. I
know all about respondsToSelector: too. None of these fit.
What's frustrating me is I can't find a way to tell at COMPILE time
which SDK the software is being compiled against.
I need to allow compilation on 10.2 or 10.3. Is there any way to ask
"#ifdef PANTHER_OR_LATER" etc?
Just to be clear, I handle using the constant FOO at runtime later in
the code, what I need is a macro that allows me to conditionally
include the value kThemeResizeUpCursor in the code or not. It feels
like this should be simple, but how can I do it?
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
(see you later space cowboy ...)
_______________________________________________
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