Weird Problem with Embedding Frameworks
Weird Problem with Embedding Frameworks
- Subject: Weird Problem with Embedding Frameworks
- From: Marc Weil <email@hidden>
- Date: Tue, 10 Jun 2003 21:03:02 -0400
Hello,
Before you all start telling me to go look through the archives, I already
have. I know how to build a framework so it is embeddable, and I know how to
make a Copy Files build phase in PB for my application so it copies the
framework into the Frameworks folder of the app's bundle.
So now that we have gotten that out the way, I have a problem. :-)
Okay, first I add the framework (EDCommon) to my application using Add
Frameworks (it currently resides in /Library/Frameworks). EDCommon has
already been built (by me) to be embeddable. Of course, I add the framework
to my app's target. Then, I created a Copy Files build phase for the target,
made it first in the list of build phases, and added EDCommon.framework to
the list of files that need copying.
Then I build, and everything goes fun. The app runs no problem. So I figure
that since the framework is now embedded in my application (I checked in the
bundle and EDCommon.framework was in the Frameworks folder, as it should
be), I shouldn't need it in my /Library/Frameworks folder. So I remove it.
But now whenever I run the app, dyld complains that it can't find the
framework. But it is in the bundle! Why is it doing this? For some reason,
my app doesn't seem to be linking to the framework in its bundle, but
rather, to the one in the main frameworks folder instead. Did I miss a step
here or something? What did I do wrong?
Also, after cleaning the project and trying again, I get linker warnings
about prebinding being disabled because the memory address for things such
as __TEXT and __PAGE in @executable_path/../Frameworks/EDCommon.framework
and in /Library/Frameworks/EDCommon.framework overlap. So now it seems to be
trying to link against the framework twice, in the two different locations!
I am really baffled by this. Any assistance?
Thanks,
Marc Weil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.