• 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
NSPreferencePane with my own private framework?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPreferencePane with my own private framework?


  • Subject: NSPreferencePane with my own private framework?
  • From: Ryan Poling <email@hidden>
  • Date: Fri, 7 Mar 2008 08:55:15 -0800

Hi all,

Moving this question over from cocoa-dev since it seems to be more of an Xcode issue.

I've been having a problem getting one of my private frameworks to work correctly with a project which creates an NSPreferencePane for use with System Preferences. Basically, as soon as I try to add my framework to the project, System Preferences refuses to load the pane with an error like the following logged to the console:

3/5/08 1:53:14 PM System Preferences[11649] Error loading /Users/ryan/ Library/PreferencePanes/Myprefpane.prefPane/Contents/MacOS/Myprefpane: dlopen(/Users/ryan/Library/PreferencePanes/Myprefpane.prefPane/ Contents/MacOS/Myprefpane, 265): Library not loaded: @executable_path/../Frameworks/MyFramework.framework/Versions/A/ MyFramework
Referenced from: /Users/ryan/Library/PreferencePanes/ Myprefpane.prefPane/Contents/MacOS/Myprefpane
Reason: image not found


I am running this on Leopard if it matters...

Based on Nick's suggestions from cocoa-dev, I've tried changing various build settings to look in @loader_path/../Frameworks and @bundle_path for the framework, but no luck yet.

It doesn't seem like this should really be that hard - I use the framework in plenty of other "normal" Cocoa application projects and it works fine, so using it in a preference pane shouldn't be too much worse.

Anyway, I'm sure I'm just missing some simple setting in Xcode which will make everything get along.

Suggestions appreciated.

Thanks,

-Ryan

<http://www.chimoosoft.com/>


On Mar 5, 2008, at 3:44 PM, Ryan wrote:

Thanks for the reply. I tried changing the installation directory on my framework to use @loader_path and re-built it, but I'm still getting the same error message when trying to open the preference pane.

I imagine I have to change something in the build settings for the preference pane project itself (rather than just in the framework project), but I'm not sure what to change. Any tips? Perhaps I should forward this over to the Xcode users list.

Thanks.

-Ryan

On Mar 5, 2008, at 2:14 PM, Nick Zitzmann wrote:
That won't work because @executable_path points to the path of System Preferences, not your preference pane. Try using @loader_path instead, or make a static version of your framework if possible.

Nick Zitzmann
<http://www.chronosnet.com/>

On Mar 5, 2008, at 2:14 PM, Nick Zitzmann wrote:

On Mar 5, 2008, at 3:00 PM, Ryan wrote:

3/5/08 1:53:14 PM System Preferences[11649] Error loading /Users/ ryan/Library/PreferencePanes/Myprefpane.prefPane/Contents/MacOS/ Myprefpane: dlopen(/Users/ryan/Library/PreferencePanes/ Myprefpane.prefPane/Contents/MacOS/Myprefpane, 265): Library not loaded: @executable_path/../Frameworks/MyFramework.framework/ Versions/A/MyFramework
Referenced from: /Users/ryan/Library/PreferencePanes/ Myprefpane.prefPane/Contents/MacOS/Myprefpane
Reason: image not found


What in the heck? I'm sure my framework works okay as I'm using it in another project... Any ideas on this one?

That won't work because @executable_path points to the path of System Preferences, not your preference pane. Try using @loader_path instead, or make a static version of your framework if possible.





_______________________________________________ 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: NSPreferencePane with my own private framework?
      • From: "Sherm Pendley" <email@hidden>
  • Prev by Date: Another Xcode spaces question
  • Next by Date: No device connected in XCode 3.1
  • Previous by thread: Re: Another Xcode spaces question
  • Next by thread: Re: NSPreferencePane with my own private framework?
  • Index(es):
    • Date
    • Thread