Re: XCode4 force relink when static library change
Re: XCode4 force relink when static library change
- Subject: Re: XCode4 force relink when static library change
- From: Andreas Grosam <email@hidden>
- Date: Tue, 01 Nov 2011 10:36:08 +0100
On Oct 31, 2011, at 7:02 PM, Bruno Berisso wrote:
> Thanks for your answer.
>
> Let my explain it in more detail. I'm using XCode4 with a workspace that contains both projects, the configuration is as follow:
> Add B as dependency of A through the "Build Phases" -> "Link Binary With Libraries"
> Set up the workspace to build all the projects in the same location (in the menu File->Workspace Settings->Advanced set the "Build Location" to "Location specified by Xcode Preferences", and in the Xcode Preferences->Locations->Advanced set the "BuildLocation" to "Derived Data Location (Recommended)" and check the option "Shared subfolder" with the value "Build")
>
> Now, when I make a change in the B project and run A, Xcode compile B and generate the .a file as expected but it never link the A project again. It's keep using the previous version until I make a clean of the A project.
> I check the command that Xcode perform to build and link A and It's seams ok, it make reference to the last version of B and I haven't any other version of this file in my machine.
>
> I appreciate your help.
> Regards
At least me and someone else had exactly the same issue and reported it in this forum a few days ago.
You may check these settings for a possible source of the problem:
In the Build section of the application's scheme
- ensure that "Find Implicit Dependencies" is checked.
- "Parallelize Build" option. Try with unchecking this option.
When "Find Implicit Dependencies" is checked, in the Build section of application's scheme there is no need to add the static library target to the targets. In my case, the project failed to compile properly when the static library was listed there.
In the application's Build settings check the "Library Search Path" setting if there is an incorrect path set for the static library. You may even remove the path pointing to the static library completely. Xcode seems not to require this path *here* - apparently it can use the information from the linked libraries build setting.
My attempt to reproduce the issue in a small project failed, though.
Regards
Andreas
>
>
> On Oct 31, 2011, at 2:17 PM, Jens Alfke wrote:
>
>>
>> On Oct 31, 2011, at 5:50 AM, Bruno Berisso wrote:
>>
>>
>> This should work, so something’s clearly wrong with the way the project/workspace is set up, but without details it’s hard to give advice.
>> - What version of Xcode?
>> - Are the two projects in a common workspace (Xcode4), or have you added the B project to the A project to set up a dependency?
>> - Are you sure that the B library that A links is the exact same build product created by the B project?
>>
>> —Jens
>>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
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