• 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: Problem with compiler directives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with compiler directives


  • Subject: Re: Problem with compiler directives
  • From: Laurent Daudelin <email@hidden>
  • Date: Fri, 01 Apr 2011 13:32:38 -0700

On Apr 1, 2011, at 13:30, Laurent Daudelin wrote:

> On Apr 1, 2011, at 00:34, Robert Purves wrote:
>
>> Laurent Daudelin wrote:
>>
>>> In my deployment configuration, I have the SDKROOT defined with a build setting condition:
>>>
>>> x86_64 = macosx10.6
>>> i386 = macosx10.5
>>> ppc = macosx10.5
>>>
>>> Now, when I build and omit the <NSToolbarDelegate>, when the compiler compiles the x86_64, it complains with a warning that my ToolbarController doesn't implement protocol "NSToolbarDelegate".
>>>
>>> So, to get around this annoying warning, I did this in my ToolbarController.h file:
>>>
>>> #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
>>> @interface ToolbarController : NSObject <NSToolbarDelegate>
>>> #else
>>> @interface ToolbarController : NSObject
>>> #endif
>>>
>>> I'm obviously missing something because when the compiler compiles the ppc binary, it gives me an error that it can't find protocol NSToolbarDelegate:
>>
>> Try:
>>
>> #if defined MAC_OS_X_VERSION_10_6 && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
>
> I think I found the problem with my outlets not being recognized anymore in Interface Builder.
>
> That was an old controller class still using the older syntax for defining outlets:
>
>    IBOutlet id			mainWindow;
>
> When I convert it to:
>
>    NSWindow			*mainWindow;
>
> and add the proper
>
> @property (assign) IBOutlet NSWindow *mainWindow;
>
> Then all the outlets are recognized and parsed by IB except the first one.
>
> What can I do to fix this?
>
> -Laurent.

Maybe I should have mentioned that the problem is caused when I try to put the @interface declaration between compiler directives:

#if defined MAC_OS_X_VERSION_10_6 && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
@interface FSController : NSObject <NSOpenSavePanelDelegate>
#else
@interface FSController : NSObject
#endif

Any way around that problem?

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
Logiciels Nemesys Software              				email@hidden


 _______________________________________________
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: Problem with compiler directives
      • From: Christiaan Hofman <email@hidden>
References: 
 >Re: Problem with compiler directives (From: Robert Purves <email@hidden>)
 >Re: Problem with compiler directives (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Problem with compiler directives
  • Next by Date: Re: Xc4 memory sanity
  • Previous by thread: Re: Problem with compiler directives
  • Next by thread: Re: Problem with compiler directives
  • Index(es):
    • Date
    • Thread