Re: Schemes and Targets
Re: Schemes and Targets
- Subject: Re: Schemes and Targets
- From: Andreas Grosam <email@hidden>
- Date: Wed, 30 May 2012 19:32:37 +0200
On May 30, 2012, at 12:41 AM, koko wrote:
> Asume:
>
> BSD Static Library … LibBase.a
>
> which is built in Debug and Release versions by choosing the Debug or Release configuration in the Scheme for its Target LibBase.
>
> Now I want to build an app that links with LibBase.a.
>
> I would like to link with the Debug version of LibBase.a when I choose the Debug Configuration in the Scheme for the app Target and link with the Release version of LibBase.a when I choose the Release Configuration in the Scheme for the app Target.
AFAIK, this is the default. However, the UI does not make this clear. It seems, this is somewhat hardwired into the build process, and it actually doesn't matter which binary file you specify (Release or Debug) for the library. Apparently, Xcode selects the Configuration of dependent targets according to the Configuration of the main product. This is of course not a full description of the behavior since it leaves arising questions unanswered.
IMHO, there should be a way to explicitly specify any combination of Client Configuration and Library Configuration. If you think this is useful, please file a bug report.
Please note, there is a bug in Xcode's build dependencies evaluation. Xcode apparently uses the **specified** file reference (URL?) of the library during its dependency check . This can be for example the Debug version, the Release version, or even a non existent file reference, which will be created when you link against the library but the binary does not yet exist. When building the main product, say for the Release Configuration, Xcode then checks the files of the libraries, which might reference a Debug version. Then the dependency check becomes wrong, of course.
>
> This does not seem possible as in the Build Phases Link Binary With Libraries release and debug libraries cannot be associated with the Release and Debug Configurations of the Scheme.
>
> Do I have to make two targets, Debug and Release to affect this solution?
Please look at the transcript and figure what actually happens.
Please file a bug report, too.
Regards
Andreas
_______________________________________________
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