More on embedding frameworks
More on embedding frameworks
- Subject: More on embedding frameworks
- From: Randall Meadows <email@hidden>
- Date: Mon, 16 Jul 2007 13:50:28 -0600
OK, so upon further instruction (thanks, Chris!), I've got my
projects to a state where most everything is working, for some
definition of "working". I don't think, though, that it's really the
right way to do this, but I can't figure out what is, and still
works. The problem seems to be that not only does my parent
application project depend on all the frameworks, but there is some
interdependency amongst various frameworks.
App depends on A, B, C, D, E, F, G
A depends on C
B depends on C
C depends on nothing else
D depends on A, C
E depends on A, B, C, D, F
F depends on B, C
G depends on B, C, F
What I've done to make the application work is this:
1) Nothing special in the application project, just link to the
frameworks copied into the application bundle.
2) Each framework project runs 'install_name_tool -id' in a Run
Script phase at the end of the build to use the @executable_path form.
I don't view this as "correct" since this appears to make the
frameworks embeddable ONLY, and not usable as standalone framework.
This seems to be confirmed when I try to build a particular target of
project F, which yields an Interface Builder palette. When linking,
I get warnings:
"can't open dynamic library:
@executable_path/../Frameworks/C.framework/Versions/A/C referenced
from /project/path/F/../../build/Debut/F.framework/F (checking for
undefined symbols may be affected) (No such file or directory, errno
= 2)"
and an error of "undefined symbols referenced from F expected to be
found in @executable_path/../Frameworks/C.framework/Versions/A/C".
With such a web of interdependencies, is there a way to configure all
the projects such that linking and run-time loading "just works"? Or
should I just resign myself to installing the frameworks in standard
locations (like ~/Library/Frameworks) every time I build? And have a
"Distribution" target in the parent application project that embeds
the frameworks in its bundle and does the "install_name_tool"
voodoo?
Any tips on how to navigate this, what I've come to refer to as the
"Colossal Framework Adventure" ("You are in a maze of twisty little
passages, all alike, but none of them really passable.")?
Thanks!
randy
_______________________________________________
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