Re: Linking Tool to nested dylib: "Library not loaded…"
Re: Linking Tool to nested dylib: "Library not loaded…"
- Subject: Re: Linking Tool to nested dylib: "Library not loaded…"
- From: Jerry Krinock <email@hidden>
- Date: Mon, 24 Oct 2011 10:33:12 -0700
On 2011 Oct 24, at 09:18, Fritz Anderson wrote:
> I'll start with a literal reading of the error message: Is there a file /Users/jk/Builds/Debug/libmozalloc.dylib? Does it contain an architecture that's the same as TestTool's architecture?
I'd tried that, but wasn't sure if it was necessary. After your suggestion, I looked more carefully and found a mistake in my previous try.
It works now. Thank you, Fritz.
I think the explanation is that Mozilla's Xulrunner dylibs are apparently compiled with the magic @executable_path in their INSTALL_PATH. A Firefox Add-On linking to the Xulrunner dylibs works when run in Firefox because the Xulrunner dylibs are packaged in /Applications/Firefox.app/Contents/MacOS/, alongside the executable, firefox-bin.
So, when I want to test my dylib, which is linked to these Xulrunner dylibs, in a test tool executable, I need the Xulrunner dylibs to be available at the same relative path as they are in the Firefox package.
* * *
I call @executable_path "magic" because I've never understood how a library can tell the executable where it is located, so that the executable can locate said library.
_______________________________________________
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