• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linking Tool to nested dylib: "Library not loaded…"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • RE: Linking Tool to nested dylib: "Library not loaded…"
      • From: "Dallman, John" <email@hidden>
    • Re: Linking Tool to nested dylib: "Library not loaded…"
      • From: Geoff Beier <email@hidden>
References: 
 >Linking Tool to nested dylib: "Library not loaded…" (From: Jerry Krinock <email@hidden>)
 >Re: Linking Tool to nested dylib: "Library not loaded…" (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Xcode 4.2 super slow documentation searching
  • Next by Date: Re: Linking Tool to nested dylib: "Library not loaded…"
  • Previous by thread: Re: Linking Tool to nested dylib: "Library not loaded…"
  • Next by thread: Re: Linking Tool to nested dylib: "Library not loaded…"
  • Index(es):
    • Date
    • Thread