Re: Including CoreServices/Timer.h?
Re: Including CoreServices/Timer.h?
- Subject: Re: Including CoreServices/Timer.h?
- From: Fritz Anderson <email@hidden>
- Date: Tue, 9 Feb 2010 19:37:15 -0600
On 9 Feb 2010, at 7:23 PM, Jonathon Kuo wrote:
> I need to use a few CoreServices timing methods, so I've added CoreServices.framework to the Frameworks folder of my project. In my code, I have this:
>
> #import <CoreServices/Timer.h>
>
> But when I compile, I get:
>
> /Users/Jon/Projects/Sources/Scheduler.m:16:31: error: CoreServices/Timer.h: No such file or directory
>
> It's out there on disk, at:
> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Timer.h
>
> Is there some other setting or file I need to include also? Base SDK is set to 10.5
Cherrypicking headers out of a framework (especially out of a subframework of an umbrella framework) is so impractical that there's no point in working out how to do it. The internal structure of umbrella frameworks is private to Apple. They are entitled to change it arbitrarily, so anything you do to pick out just one header is apt to fail as SDKs evolve.
Compilers and the computers that run them are fast nowadays. The marginal cost of putting
#import <CoreServices/CoreServices.h>
into an infrequently-changed precompiled header should be half a second on precompilation, milliseconds on first load, and much less on subsequent loads. Do it that way.
(Okay, don't swear me to my time estimates. The point is that you won't notice the speed difference between precompiling all the CoreServices headers and loading just one header out of it. And precompiling all of them works.)
— F
_______________________________________________
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