Re: Static lib linking (XCode 2.1)
Re: Static lib linking (XCode 2.1)
- Subject: Re: Static lib linking (XCode 2.1)
- From: Paul Walmsley <email@hidden>
- Date: Fri, 25 Nov 2005 13:21:37 +0000
Now, make a modification to a file in S, and hit "Build" in A's
project window. "A" knows that "S" is a dependency, and builds it,
but DOES NOT LINK AGAINST THE RESULTING LIBRARY. In other words, the
build step for A occurs, but has no content, because it doesn't think
anything has changed (it doesn't notice the new library, apparently).
This is 100% reproducible for me, and it's driving me nuts
I've got a workaround, which is rather gross but at least ensures you've
got an up-to-date build:
* Add a Script phase and ensure that it comes before the 'Link
Binary with Libraries' build phase.
* Set the contents of the script to:
if [ -f "$TARGET_BUILD_DIR/$TARGET_NAME ]; then
rm "$TARGET_BUILD_DIR/$TARGET_NAME"
fi
The crap part of this is that if you make a change in a sub-project you
may need to hit build twice -- the first will ensure the target is
trashed and the second will cause it to be linked. This occurs since
xcode appears to calculate dependencies before it executes the script
phases. So the first time it will decide that it won't relink *before*
the above phase deletes the target. The second time the target doesn't
exist so the dependency check forces a full link.
_______________________________________________
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