Re: Schemes and Targets
Re: Schemes and Targets
- Subject: Re: Schemes and Targets
- From: Andreas Grosam <email@hidden>
- Date: Wed, 30 May 2012 22:52:29 +0200
On May 30, 2012, at 8:53 PM, Fritz Anderson wrote:
> On 30 May 2012, at 12:32 PM, Andreas Grosam wrote:
>
>> Xcode apparently uses the **specified** file reference (URL?) of the library during its dependency check .
>
> I don't believe "specified dependency" is a term Xcode uses. Could you clarify?
This file reference (URL) which I mean by this, is the file reference (URL) that Xcode instantiates and uses in the List in the "Link Binary With Libraries" pane when we select an entry (a library, framework, etc.) from the selection dialog.
That does not mean, that the "target" info is not available elsewhere. Xcode's behavior is just as it were such - and this file reference seems to be used in the dependency evaluation.
The entry in the list very likely becomes a file reference (verified by experiments), presumably a URL, which corresponds to either a non existing file or one which corresponds to one of the existing binary product of a certain Configuration.
>
> When you add a library to an application target, you refer to the target that produces the library.
Maybe, this *ought* to be the case. However, the UI clearly pretends to provide file names of the corresponding products - not target names (actually, it apparently equals the default product name). When clicking the "+" button, we can select from the following entries, for example:
> Workspace
Foo.framework
libbar.a
libfoobar.A.dylib
These entries look like the file names of the corresponding products, or frameworks respectively. Actually, they are neither target names nor are they file names of the corresponding products. When they should be product names, how would it look like, when the product names are different for each Configuration?
(You may try this out, but notice, when you change the product name of one Configuration, say from Foo to Foo-d for the Debug build, you can watch Xcode becoming confused, in several other parts of the UI and functionality.)
Well, and I'm not saying that this is what is should be, though ;)
> Xcode _ought_ to build the dependency and link to the build of the library product that corresponds to the application's configuration.*
Yes, it links with the binaries of the corresponding Configuration - provided the dependency check was correct. However Xcode doesn't evaluate the dependencies based on the binary with the corresponding configuration but with the file that will be referenced by the URL which is added to the list in "Link Binary With Libraries" pane. And this does not necessarily match the Configuration.
>
> * (I'm not saying that's what it does in practice, but that's my understanding of what the process is supposed to be.)
>
> So when you add a library to the build process, you're specifying a logical build product, and not a reference to an actual file. Do I misunderstand you?
Well, it's hard to explain what Xcode is actually doing. ;) Certainly, the confusion stems from a lack in design and certainly a few existing bugs - and partly since it happens to work in many cases, and otherwise errors are unnoticed.
It should be easy to understand, though - and work like you suggested.
Regards
Andreas
>
> — 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