• 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 to third-party Frameworks and dylibs from a plug-in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking to third-party Frameworks and dylibs from a plug-in


  • Subject: Re: Linking to third-party Frameworks and dylibs from a plug-in
  • From: Dan Korn <email@hidden>
  • Date: Mon, 10 Mar 2008 21:23:48 -0500

Thanks to Sherm and William and some others off-list for all the help and patience. I was able to use install_name_tool to change my plug- in to load all the frameworks and dylibs from @loader_path/../ Frameworks/.

Much to my relief, I DID NOT have to modify any of the third-party frameworks or libraries themselves. It makes sense that it doesn't matter where the library you're loading thinks it has to be; it only matters from whence you're trying to load it. However, it seems that I do have to know the location where each framework or dylib thinks it's going to be installed (from its own build settings), because that has to be the "old" setting in the "install_name_tool -change" command.

Basically, the jist of the command is this:
install_name_tool -change @executable_path/../Frameworks/<path to dylib/framework> @loader_path/../Frameworks/<path to dylib/framework > <my plug-in>


Again, I only had to run this to modify the plug-in I'm building, not any of the third-party frameworks or dylibs themselves. After doing this, and actually installing the libraries to the Frameworks folder under my plug-in's bundle Contents folder, the plug-in loaded like a champ. Now I just need to add a Run Script step to my build to automate this (in addition to the Copy Files step to put the newly privatized frameworks inside my plug-in).

(Also, using install_name_tool with the -id option to change the "name" of any of the dylibs or frameworks doesn't seem to have any effect on loading them; so I wonder what the purpose of this option is.)

I'd still prefer to be able to have my plug-in search in multiple locations for its linked dynamic libraries (kind of like loading DLLs on that *other* operating system), but I suppose I can always change the install_name_tool command if I need to install them somewhere else and make them shared. Anyway, I'll take what I've got for now, since it's working. It would be nice, though, if Xcode at least offered an option to actually override the INSTALL_PATH in, say, the Info pane for the Framework you're copying, to make this a bit easier.

My only other question is, is there someplace where @executable_path and @loader_path and any other possible settings are documented? I looked around but couldn't find anything official.

Thanks,
Dan

_______________________________________________
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 to third-party Frameworks and dylibs from a plug-in
      • From: "Sherm Pendley" <email@hidden>
References: 
 >Linking to third-party Frameworks and dylibs from a plug-in (From: Dan Korn <email@hidden>)
 >Re: Linking to third-party Frameworks and dylibs from a plug-in (From: "Sherm Pendley" <email@hidden>)
 >Re: Linking to third-party Frameworks and dylibs from a plug-in (From: Dan Korn <email@hidden>)
 >Re: Linking to third-party Frameworks and dylibs from a plug-in (From: "Sherm Pendley" <email@hidden>)

  • Prev by Date: Ld error: symbols in framework not found. How to troubleshoot?
  • Next by Date: Re: Subversion and nib files workaround?
  • Previous by thread: Re: Linking to third-party Frameworks and dylibs from a plug-in
  • Next by thread: Re: Linking to third-party Frameworks and dylibs from a plug-in
  • Index(es):
    • Date
    • Thread