Personal tools
You are here: Home downloads Gem Documentation GemFAQ How do i make library dependencies local?
Document Actions

How do i make library dependencies local?

Up to Table of Contents

This FAQ applies to: Any version.

I want to ship dependencies side-by-side with my external and not have to install in the "correct" path (e.g. /sw/lib/)


on OSX you can change the path where a library is searched for with the install_name_tool

using the special path @loader_path, the path where the external lives will be searched

here's a small script to make all /sw/lib/ dependencies "local":

  for f in *.pd_darwin
   otool -L ${f} | grep sw | awk '{print $1}' | while read i
   do j=@loader_path/${i##*/}
     echo $f $i $j
     install_name_tool -change ${i} ${j} ${f}

Here is the script that is used in the readanysf~ library for including lots of libraries using the above technique:

see also:

How do i find out the dylib dependencies of a binary?
How do i find out, against which dynamic libraries a certain binary (e.g. the Gem-binary) is linked?
by IOhannes m zmoelnig last modified 2011-11-06 11:53 PM

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser