• 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: Plugin linking to private framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plugin linking to private framework


  • Subject: Re: Plugin linking to private framework
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 21 May 2010 10:06:05 +0100


Use @executable_path/../Frameworks as a runpath search path when linking both the plug-ins and the executable.  @executable_path is the path to the executable for the process, @loader_path is the path to whatever loaded a binary by linking against it.

All true.

However I am using @rpath for a reason.

My plug-in bundles may contain auxiliary executables.
In this case @executable_path/../Frameworks will resolve to the auxiliary executable path not the app executable path - hence no framework will be found (though it might be possible to create a link that points to the correct bundle location).

What does work is @loader_path/../../../../Frameworks.
Both the plugin and the aux executable can find the framework.

However building a plug-in that is loaded from an alternate location now fails.
Therefore @rpath seems to be the way to go.

@executable_path and @loader_path are suitable for simple scenarios.
@rpath gives much greater flexibility when linking from multiple executables.

For instance if you decide to go with @loader_path/../../../../Frameworks then you run into issues when all of a sudden you want to link your main app against that framework too.
Then you have to break out install_name_tool

I only realised I had a problem with linkage when running the app outside of xcode.
Within running within xcode the frameworks were located even though the specified link paths were incorrect.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

 _______________________________________________
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

References: 
 >Plugin linking to private framework (From: "email@hidden" <email@hidden>)
 >Re: Plugin linking to private framework (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Silencing linker warnings in xcode
  • Next by Date: Re: Silencing linker warnings in xcode
  • Previous by thread: Re: Plugin linking to private framework
  • Next by thread: Silencing linker warnings in xcode
  • Index(es):
    • Date
    • Thread