• 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: WHy is Xcode such a PITA?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WHy is Xcode such a PITA?


  • Subject: Re: WHy is Xcode such a PITA?
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 15 Dec 2007 18:04:10 -0800

On Dec 15, 2007, at 5:45 PM, Rick Mann wrote:

I just started a simple little project. I created it from Cocoa app stationery, and added some files that I've been using successfully in another project. They use CoreGraphics to draw. When I tried building the new project, it couldn't find <CoreGraphics/ CGContext.h>, which it finds just fine in the other project. I realized I was missing a Framework, so I dragged ApplicationServices from the old project to hte new.

Still can't find the header file.

When you added ApplicationServices.framework to your new project, did you add it to any of the targets in the project? A project is used for organizing targets, targets are used for building products. So it's not enough to just have a framework in your project, you also need to add it to the target whose product you want linked against that framework.


The reason for this is that sometimes you just want a framework in a project for reference, or you may only want a subset of the targets in your project to link against it.

The former is the case with all of the various Cocoa & Core Data project templates: They include references to Foundation, Core Data, and AppKit even though they all only link the Cocoa umbrella framework, to make it easy to get to the headers of the various frameworks under the Cocoa umbrella for reference.

The latter case is also quite common; for example, if I'm creating a unit test bundle for an application, that unit test bundle is the only target whose product I want linking against SenTestingKit.framework -- I don't want the application to link against that, because it's part of the developer tools rather than the operating system.

Why is this? Why can't it just work?

It's not psychic. Yet. :)

  -- 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: Framework won't link (was: WHy is Xcode such a PITA?)
      • From: Rick Mann <email@hidden>
References: 
 >WHy is Xcode such a PITA? (From: Rick Mann <email@hidden>)

  • Prev by Date: WHy is Xcode such a PITA?
  • Next by Date: Deleting menus in Interface Builder
  • Previous by thread: WHy is Xcode such a PITA?
  • Next by thread: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Index(es):
    • Date
    • Thread