• 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: compiling app for 10.6 and 10.7
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling app for 10.6 and 10.7


  • Subject: Re: compiling app for 10.6 and 10.7
  • From: Martin Hewitson <email@hidden>
  • Date: Mon, 15 Aug 2011 20:28:42 +0200

OK, using Clang didn't help. I took out all the NSPopover code I'd added and confirmed the app runs on 10.6.8. Then I added in the following snippet in to an action message:

  if ([NSPopover class]) {
    NSPopover *p = [[[NSPopover alloc] init] autorelease];
  }

recompiled with Xcode 4.1 on Lion and tested the app on 10.6.8 machine. It doesn't run. Same error message.

Any further ideas? I'll try the NSClassFromString next.

Martin



On Aug 15, 2011, at 08:20 PM, David Duncan wrote:

> On Aug 15, 2011, at 11:19 AM, Martin Hewitson wrote:
>
>>
>> On Aug 15, 2011, at 08:13 PM, David Duncan wrote:
>>
>>> On Aug 15, 2011, at 10:56 AM, Martin Hewitson wrote:
>>>
>>>> Is it ok to declare a property to be NSPopover, even if that class doesn't exist on 10.6?
>>>
>>> Yes. Using a class as a data type doesn't create linkage.
>>>
>>>> I tried the
>>>>
>>>> if ([NSPopover class]) {}
>>>>
>>>> trick, but I get the same error when running on 10.6.8. I'll try some more in case I made a mistake, but….
>>>
>>>
>>> But again, are you building with Clang? :).
>>
>> No, the project is set to use "System default (LLVM GCC 4.2)". You would rather recommend "Apple LLVM compiler 2.1" ?
>
>
> You can either use LLVM Compiler (aka Clang, I forget that it was renamed in Xcode!) or you can use the NSClassFromString I mentioned earlier. Either will solve the problem, but weak linked classes are only supported in LLVM/Clang.
> --
> David Duncan
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
    Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >compiling app for 10.6 and 10.7 (From: Martin Hewitson <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: David Duncan <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: Kyle Sluder <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: Martin Hewitson <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: David Duncan <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: Martin Hewitson <email@hidden>)
 >Re: compiling app for 10.6 and 10.7 (From: David Duncan <email@hidden>)

  • Prev by Date: Re: compiling app for 10.6 and 10.7
  • Next by Date: Re: compiling app for 10.6 and 10.7
  • Previous by thread: Re: compiling app for 10.6 and 10.7
  • Next by thread: Re: compiling app for 10.6 and 10.7
  • Index(es):
    • Date
    • Thread