Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved
Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved
- Subject: Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved
- From: Jerry Krinock <email@hidden>
- Date: Tue, 11 Dec 2007 09:22:05 -0800
On 2007 Dec, 10, at 17:21, Chris Hanson wrote:
No. I think the effect you're seeing is a result of linking against
Cocoa.framework and using symbols from CoreData.framework, not of
having CoreData.framework as a project member that isn't used in any
target. If you use a symbol like NSPersistentStoreCoordinator
that's defined in CoreData.framework, you're going to wind up
linking against it.
OK, then we'll go back to my previous statement that "it's a feature".
The issue is: What does Xcode do when it finds a symbol that is not
defined in any of the project's Linked ("in-target") frameworks, but
can find in some unlinked Apple framework? Some possible behaviors:
(a) Generate an error.
(b) Generate a warning.
(c) Do nothing. Assume that the app is going to load the required
definition
from some other bundle before it is needed. If not, too bad,
let it crash.
(d) Silently add the required -framework to ld arguments. Evil,
but at least I
could see it in the Build Transcript.
(e) Silently add a Load framework command to be executed when the
app launches.
Very evil, because the only way I can see it did that is to
run otool on
the executable.
Based on my experience last week, Xcode 2.5 did behavior (c), but
Xcode 3.0 does behavior (e).
Because I had left the undefined symbol in the project by mistake, and
in fact my app does load the required definition with another bundle
before it was needed, Xcode 2.5's behavior (c) was perfect for me.
But Xcode 3.0's behavior (e) caused the app to not launch on Panther,
and caused me great pain trying to figure out why not.
Is there any reason why (a) or (b) would not be the preferred behavior?
Why does Apple add these un-linked frameworks to the New Cocoa
Application, particularly since they are already linked by the
Cocoa.framework "umbrella"?
These non-linked frameworks -- which are conceptually (but not
physically, unlike Carbon) part of the Cocoa umbrella -- are added
to the project to make it easy to read the headers within the
framework.
For example, if you are using the Default or All-in-One layout, you
can highlight CoreData.framework in the Groups & Files tree and then
see the headers within it in the detail pane to the right. This
makes for quick access if you want to find a particular header,
especially if you can't quite remember the name. It also means you
can use the search field at the top of the window to filter the
detail view.
That's all it really does. It's a UI convenience, it doesn't have
significant deeper meaning for Xcode.
Good. I was hoping that was the case.
Thanks for explaining these issues, 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
References: | |
| >Since Xcode 3.0, ld insists on linking CoreData.framework (From: Jerry Krinock <email@hidden>) |
| >Re: Since Xcode 3.0, ld insists on linking CoreData.framework (From: Chris Espinosa <email@hidden>) |
| >Re: Since Xcode 3.0, ld insists on linking CoreData.framework (From: Jerry Krinock <email@hidden>) |
| >Re: Since Xcode 3.0, ld insists on linking CoreData.framework (From: Jerry Krinock <email@hidden>) |
| >Re: Since Xcode 3.0, ld insists on linking CoreData.framework (From: Chris Suter <email@hidden>) |
| >Re: Since Xcode 3.0, ld insists on linking CoreData.framework (From: Jerry Krinock <email@hidden>) |
| >New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved (From: Jerry Krinock <email@hidden>) |
| >Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved (From: Jonathan Hess <email@hidden>) |
| >Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved (From: Jerry Krinock <email@hidden>) |
| >Re: New "Feature"? Was: Since Xcode 3.0, ld insists on linking...Resolved (From: Chris Hanson <email@hidden>) |