Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange linking issue: the dependent framework won't be linked into app after modification #32

Open
leoncheng opened this issue Nov 4, 2011 · 2 comments

Comments

@leoncheng
Copy link

Hi, Karl

Firstly, thanks for your great job. but when I thought every thing was fine and perfect, I found a little problem.

I created two projects A and B. A is an app project which depends on B framework project.
as your solution, I add -framework B in A project, and it works fine, but not perfect. after I modified B project,
the A.app won't link the updated B.framework again. Unless I deleted the B.framework and generate it again.

so, it seems that the linker only use the framework's creation time to decide if re-linking, but not the framework's modified time.
it's really annoy. I haven't found any good solution for this except add delete operation in the pre-build action.
Do you have any good solution for this?

Thanks
Leon

@kstenerud
Copy link
Owner

Hmm yeah I tried it and am getting the same thing. It looks like Xcode isn't checking subprojects properly. I was able to get it to recognize the change by doing a clean first and then a rebuild.

Unfortunately, this looks like an Xcode problem. I don't think I can change anything in the template to mitigate the problem.

@kemenaran
Copy link
Contributor

I (finally !) found a way to fix this issue.

The trick is to ensure that all file references to the Framework file are relative to the Built products directory.

In the above example, that would mean opening the project A, find the reference to B.framework, and change its path to be relative to the built products. Ideally, the path should display the least slashes as possible: it should be a raw name.

I took the informations from this article, which gives a lot of clues to solve this kind of issues : http://www.kihongames.com/blog/labs/2011/06/labs-xcode-static-library-pitfalls/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants