Re: GetAliasSize vs. sliasSize
Re: GetAliasSize vs. sliasSize
- Subject: Re: GetAliasSize vs. sliasSize
- From: Eric Albert <email@hidden>
- Date: Sun, 2 Oct 2005 22:19:13 -0400
On Oct 2, 2005, at 9:58 PM, Norio Ota wrote:
I'm a bit confused how to write a code using aliasSize and
GetAliasSize.
I'm trying to make an app supporting MacOS 10.3 and later and Intel-
based Mac with Xcode 2.1.
I set
MACOSX_DEPLOYMENT_TARGET_ppc to 10.3.9,
MACOSX_DEPLOYMENT_TARGET_i386 to 10.4,
GCC_VERSION_ppc to 4.0,
GCC_VERSION_i386 to 4.0,
SDKROOT_ppc to /Developer/SDKs/MacOSX10.3.9.sdk
SDKROOT_i386 to /Developer/SDKs/MacOSX10.4u.sdk
For what it's worth, there's no need to set GCC_VERSION_* if you're
setting it to the same value for both architectures.
In one of my functions I try to obtain an alias size using
GteAliasSize. But Xcode tells me "error:'GetAliasSize' was not
declared in this scope". Then I used aliasSize instead, it tells
"error:'struct AliasRecord' has no member named 'aliasSize'" at
this time.
The first error comes from the PowerPC side of your build, but the
second error comes from the Intel side. I'd suggest doing something
like this:
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1040 // 10.4
// Use GetAliasSize
#else
// use aliasSize
#endif
Alternatively, if you need to do this in multiple places in your
code, you can put something like this in a header file:
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040
#define GetAliasSize(alias) ((**alias).aliasSize)
#endif
Hope this helps,
Eric
_______________________________________________
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