I've got two frameworks that I build in a shared built products
location. Both of them are intended to be embedded inside an
application and have install paths set that start with:
@executable_path/../Frameworks/
Framework A links against Framework B. When I try to make a Bundle C
which links only against Framework A I get warnings at link time that
look like this:
/usr/bin/ld: warning can't open dynamic library: @executable_path/../
Frameworks/FrameworkB.framework/Versions/A/FrameworkB referenced
from: /Users/ghurrell/build/Release/FrameworkA.framework/FrameworkA
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
The warning message says "no such file" but the frameworks obviously
*are* in the shared built products directory. Evidently the linker is
not looking in the shared built products directory but is instead
looking somewhere else (evidently, "@executable_path/../Frameworks/";
but what does it consider to be the executable_path in this case? the
file in the bundle at "Contents/MacOS/Executable"? the executable in
Framework A at "Versions/A/Executable"?)
To make these errors go away I have to link Bundle C against
Framework B, even though the bundle makes no reference to any symbols
in it. My question is, is this normal behaviour?
Setting FRAMEWORK_SEARCH_PATHS to the shared built products location
doesn't help. I also tried setting up symbolic links to the framework
in the various places that the linker might expect to find it (eg. at
"@executable_path/../Frameworks/", trying a few different values for
"executable_path") but that didn't eliminate the warnings either.
It's not a huge problem; I'm just trying to refine my understand of
how frameworks can get linked.
For reference, here is the link command shown in the build results
window at the time warning
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden
This email sent to email@hidden