• 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
Library not loaded: @executable_path/..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Library not loaded: @executable_path/..


  • Subject: Library not loaded: @executable_path/..
  • From: Bill Monk <email@hidden>
  • Date: Mon, 18 Jul 2005 10:42:46 -0500

I have a framework which is embedded in a Quicktime component. The two projects are set up according to the embedding frameworks video on rentsch.com. My situation, however, is slightly different, which leads to the problem described below.

A third project, an application, has a Copy Files build phase to copy the component (with the embedded framework) into the app's bundle. When it runs, if the app needs the component, it locates the component in its bundle and registers it privately using RegisterComponentFileRef().

When built, a quick look confirms that the app's Resources folder does contain the component, and the component's Frameworks folder does contain the framework.

When run, the app registers the component OK. But when it attempts to use the component (say, by calling Quicktime's ConvertMovieToFile () ), this runtime error occurs:

2005-07-18 10:05:30.211 ExportLofiMP3[2043] CFLog (21): Error loading /Users/billmonk/Projects/MyProject/build/Development/ MyProject.app/Contents/Resources/MyComponent.component/Contents/MacOS/ MyComponent: error code 4, error number 0 (Library not loaded: @executable_path/../Frameworks/MyFramework.framework/Versions/A/ MyFramework

Referenced from: /Users/billmonk/Projects/ MyProject/build/ Development/MyProject.app/Contents/Resources/MyComponent.component/ Contents/MacOS/MyComponent
Reason: image not found)


It seems clear the framework is being looked for in the app's executable path, rather than in the component's path, and indeed if I put a copy of the framework into the app's Frameworks folder (or set up a Copy File buld phase to do it), everything works fine.

So, the Question: how do I get the component to find the framework within its -own- bundle, rather than looking in the path of the parent app which uses the component?

In the framework project, this option is set

INSTALL_PATH = "@execution_path/../Frameworks"

which would (and in fact does) work fine when the framework is embedded in the app. But I would like the framework embedded in the component so that it is self-contained. This gives an extra "layer of indirection", and I don't know how to set that up in Xcode.

Thanks for any pointers...



_______________________________________________
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: Library not loaded: @executable_path/..
      • From: "Peter O'Gorman" <email@hidden>
  • Prev by Date: Docs for XCode plugins
  • Next by Date: Re: Library not loaded: @executable_path/..
  • Previous by thread: Re: Docs for XCode plugins
  • Next by thread: Re: Library not loaded: @executable_path/..
  • Index(es):
    • Date
    • Thread