Re: Difficulty embedding linked frameworks in a Cocoa bundle
Re: Difficulty embedding linked frameworks in a Cocoa bundle
- Subject: Re: Difficulty embedding linked frameworks in a Cocoa bundle
- From: Preston Jackson <email@hidden>
- Date: Tue, 2 Sep 2008 09:52:15 -0600
Stephen,
First off, you should probably just link to /usr/lib/libneon.dylib.
You can set up your "Header Search Paths" to find the headers you have
installed locally. Just make sure to link to the system library. If
you are absolutely certain you want to roll your own neon.framework,
then perhaps the following will help:
If you are loading one framework from another, which are both
contained in a parent bundle, it is easy to get confused by the
@loader_path. I don't have access to your code, so I'm sort of
guessing here but your loader (i.e. musicbrainz3) is probably in a
path something like this:
Plugin.plugin/Contents/Frameworks/musicbrainz3.framework/Versions/A/
musicbrainz3
This is your @loader_path. Now substitute use that information to form
the install path of neon.framework, which should be located here (am I
right?):
Plugin.plugin/Contents/Frameworks/neon.framework/Versions/A/neon
So, from musicbrainz3 (which is your loader) we need a relative path
back to neon. That means your "Installation Directory" in
neon.framework should be something like this:
@loader_path/../../../
And the "Dynamic Library Install Name" should automatically expand to
something like this:
@loader_path/../../../neon.framework/Versionss/A/neon
For debugging purposes, you can substitute the @loader_path with the
real path to the loader and see if it makes sense. In the case I've
outlined above it would look like this:
Plugin.plugin/Contents/Frameworks/musicbrainz3.framework/Versions/
A/../../../neon.framework/Versionss/A/neon
Hope this helps,
Preston
http://sidelightblog.blogspot.com
On Aug 23, 2008, at 10:48 AM, Stephen F. Booth wrote:
I'm attempting to build a plug-in (for an application) which is
built as a Cocoa bundle. The bundle in question contains two
frameworks I've compiled, musicbrainz3.framework and
neon.framework. The musicbrainz3 I've built depends on my own hand-
rolled neon, because although the system contains /usr/lib/
libneon.dylib, the 10.5 SDK does not contain the headers for it.
I'm able to build the plug-in successfully, and both the frameworks
are copied to the bundle's Frameworks folder. The problem comes at
runtime, when the loader can't find the image for my neon.framework
(referenced from musicbrainz3). I've set the install path for the
musicbrainz3.framework to @loader_path/../Frameworks which works
correctly. I'm stumped as to what to set the install path for
neon.framework. I've tried many combinations of @loader_path with
no luck.
Can anyone shed some light on how to do this?
Thanks,
Stephen
_______________________________________________
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
_______________________________________________
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