Re: Building framework with another framework
Re: Building framework with another framework
- Subject: Re: Building framework with another framework
- From: Ryan Homer <email@hidden>
- Date: Thu, 10 Jan 2008 08:50:47 -0500
On 9-Jan-08, at 2:15 PM, Steve Mills wrote:
I've manually created the symlink in CCILib.framework/ named
Frameworks and pointed it to CCILib.framework/Versions/Current/
Frameworks/. I then used install_name_tool to change the CCILib
executable so it points to the MAAEL executable located inside its
own framework:
I'm not sure that the symlink you created above makes sense. CCILib is
where it is supposed to be, a subdirectory of @executable_path/../
Frameworks so there is no need to have a symlink. It's the MAAEL
framework that's buried in CCILib that may need to "appear" to be a
subdirectory of @executable_path/../Frameworks.
So, there should be a symlink directory named MAAEL.framework located
in the @executable_path/../Frameworks directory that points to
CCILib.framework/Versions/Current/Frameworks/MAAEL.framework
Note that I'm only using @executable_path in the above text as a place
holder for /depot/8.0.x/creatortech/desktop/mac/MAAEL/build/Debug/
MacOS; don't use them to create the symlink and don't confuse them
with its real use. Also keep in mind that this may not even be
necessary if you are willing to type out the long path names.
So, if you're in the Frameworks directory (the highest one in the
hierarchy):
$ ln -s CCILib.framework/Versions/Current/Frameworks/MAAEL.framework
MAAEL.framework
You'll have to double check the path; I'm only going by the original
diagram you provided. Once you have this link, whenever you refer to
the MAAEL.framework, you only need @executable_path/../Frameworks/
MAAEL.framework/...
Screamer:~$ otool -L /depot/8.0.x/creatortech/desktop/mac/MAAEL/
build/Debug/CCILib.framework/Versions/A/CCILib
/depot/8.0.x/creatortech/desktop/mac/MAAEL/build/Debug/
CCILib.framework/Versions/A/CCILib:
@executable_path/../Frameworks/CCILib.framework/Versions/A/CCILib
(compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/CCILib.framework/Versions/Current/
Frameworks/MAAEL.framework/MAAEL (compatibility version 1.0.0,
current version 1.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/
CoreFoundation (compatibility version 150.0.0, current version
368.28.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.9)
I'm still getting the link errors, so I've obviously incorrectly
understood. Does the above look right or wrong? Do I also need to
run install_name_tool on MAAEL, or can it continue to have its entry
as "@executable_path/../Frameworks/MAAEL.framework/Versions/A/MAAEL"?
@executable_path/../Frameworks/CCILib.framework/Versions/A/CCILib
This looks right, though I just realized that you could have used
simply @executable_path/../Frameworks/CCILib.framework/CCILib as that
symbolic link points to the current one.
@executable_path/../Frameworks/CCILib.framework/Versions/Current/
Frameworks/MAAEL.framework/MAAEL
This looks right too. Now you will need to do the same thing with the
MAAEL framework, so do an otool on /depot/8.0.x/creatortech/desktop/
mac/MAAEL/build/Debug/MAAEL.framework/MAAEL and make sure that this
framework knows how to find itself and the libraries that it needs to
load.
I also hope I can do all of this in one of the targets as part of a
shell script action - assumedly the CCILib framework target, right?
Yes, there is a Run Script Build Phase in which you can do all this.
The Xcode documentation provides the $-prefixed variables you can use
to point to the correct paths.
_______________________________________________
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