Xcode does not rebuild app when source file updated in dependent static library
Xcode does not rebuild app when source file updated in dependent static library
- Subject: Xcode does not rebuild app when source file updated in dependent static library
- From: Russell Finn <email@hidden>
- Date: Fri, 19 Oct 2012 11:54:35 -0400
I have encountered an issue with Xcode's implicit dependency checking
and static libraries, which I believe to be a bug in Xcode (and have
reported as such); I'm raising it here in case anyone else has any
ideas about it. In brief, if an application depends on a static
library, and a source file that is a component of the library is
modified, Xcode rebuilds the library but does not relink the
application, so the change is not seen in the application.
More specifically: I have a workspace that contains an application
project and a static library project, such that the application calls
a function in the library (and the result is visible in the
application: e.g. the function returns text that is displayed in a
label in the application). The static library is included in the
"Link Binary with Libraries" build phase of the application target.
Building from scratch causes the library to be built first, then the
application, as expected (in other words, Xcode has detected the
dependency).
Now, if I modify the text of the message in the library source file,
then click the "build and run" button, Xcode correctly rebuilds the
library, but *fails* to relink the application, so when the
application runs, the unmodified message text is displayed.
I am running Xcode 4.5.1 under Mac OS X 10.8.2. In the scenario I
reported, the application is an iOS single-view application and the
static library function being called happens to be implemented in C++.
(This matches the scenario I encountered at my current position.)
I have reported the issue as <rdar://12535282>. Currently I know of
no workaround other than cleaning and rebuilding.
Has anyone else seen this, or has any other insight? Thanks in advance.
-- Russell Finn
_______________________________________________
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