• 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: Newbie question: Can't get Xcode "Build & Run" to run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question: Can't get Xcode "Build & Run" to run


  • Subject: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 22 May 2009 17:04:55 -0700

On May 22, 2009, at 1:26 PM, Michael Crawford wrote:

With or without precompiled headers, I always avoid:

  #include <Carbon/Carbon.h>

Instead, when I need a framework header, I only include the specific
one I need.  This takes some extra work in setting up one's Xcode
projects, because internal frameworks aren't found by default, but it
can be handled by setting the framework search paths appropriately.

By "internal frameworks," I assume you mean "sub-frameworks of umbrella frameworks."  In other words, you're talking about frameworks like (say) CoreGraphics.framework, which is a sub-framework of the ApplicationServices.framework umbrella framework.

Don't do that.

When an umbrella framework is provided, that's all that is supported for importing headers from or linking against.  That's intentional:  Sub-frameworks could move, be renamed, be consolidated, be broken apart, etc.  But if you import the umbrella framework header, and link against the umbrella framework, your code and your built product will be safely insulated from that.

Note that this applies to umbrella frameworks that contain other frameworks like Carbon.framework, ApplicationServices.framework, CoreServices.framework, and so on.  The Cocoa.framework umbrella doesn't actually contain AppKit.framework, CoreData.framework, or Foundation.framework so it's safe to directly import from or directly link to them.  (Though generally apps should just import and link against the Cocoa umbrella.)

  -- Chris

 _______________________________________________
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: Newbie question: Can't get Xcode "Build & Run" to run
      • From: email@hidden (Hado Hein)
References: 
 >Newbie question: Can't get Xcode "Build & Run" to run (From: Paul Denlinger <email@hidden>)
 >Re: Newbie question: Can't get Xcode "Build & Run" to run (From: Michael Crawford <email@hidden>)
 >Re: Newbie question: Can't get Xcode "Build & Run" to run (From: Chris Espinosa <email@hidden>)
 >Re: Newbie question: Can't get Xcode "Build & Run" to run (From: Michael Crawford <email@hidden>)

  • Prev by Date: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • Next by Date: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • Previous by thread: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • Next by thread: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • Index(es):
    • Date
    • Thread