• 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: 'Cocoa/Cocoa.h' file not found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Cocoa/Cocoa.h' file not found


  • Subject: Re: 'Cocoa/Cocoa.h' file not found
  • From: Carl Hoefs <email@hidden>
  • Date: Thu, 05 Mar 2015 17:39:26 -0700

On Mar 5, 2015, at 11:41 AM, Fritz Anderson <email@hidden> wrote:

> On 2 Mar 2015, at 6:25 PM, Carl Hoefs <email@hidden> wrote:
>
>> I'm trying to build/update an old project for OS X 10.9, but Xcode 6.1.1 is complaining:
>>  'Cocoa/Cocoa.h' file not found
>>
>> The reference is from the project's prefix.pch file:
>> #ifdef __OBJC__
>> #import <Cocoa/Cocoa.h>
>> #endif
>>
>> I've re-added Foundation, Cocoa, and AppKit frameworks, set the SDK to 10.9, and updated the project settings at Xcode’s prompting. What else must I do?
>
> Just for grins, turn module support on in the build settings, and replace the above with
>
> #ifdef __OBJC__
> @import Cocoa;
> #endif
>
> I’d gladly hear why your setup didn’t work — it’s the way Xcode templates do it — but that would involve more information.
>
> @import has the advantage of loading the equivalent of the precompiled Cocoa/Cocoa.h (and similarly for other frameworks) without the need for a precompiled header. In fact, the framework #includes are (I believe) implemented as @import behind the scenes, which is why the current templates do away with .pch and #import them in every header.

It turns out that there was a “-isysroot=” setting pointing to a non-existent 10.4 SDK buried way down in the custom settings that seemed to override all other settings!

Thanks,
-Carl


 _______________________________________________
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


References: 
 >'Cocoa/Cocoa.h' file not found (From: Carl Hoefs <email@hidden>)
 >Re: 'Cocoa/Cocoa.h' file not found (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Swift Autocomplete and closures
  • Next by Date: 64-bit int not being aligned in 32-bit ARM, causing crash
  • Previous by thread: Re: 'Cocoa/Cocoa.h' file not found
  • Next by thread: Swift CloudKit perRecordProgressBlock
  • Index(es):
    • Date
    • Thread