General OS X question: DYLD_LIBRARY_PATH and install name

C. Florian Ebeling febeling at macports.org
Wed Oct 29 14:30:17 PDT 2008


Hi,

I recently came across the statement that one needs to set the DYLD_LIBRARY_PATH
variable if you want to run an executable linked against a dynamic
library which is not to be found
in any of the standard locations (~/lib:/usr/lib:/usr/local/lib). That
is the case for all mp installed
libraries, I'd say. My immediate reaction was that this is not true,
and that everything is fine
without the variable as long as `otool -L' points to the right
location. So the "install name" counts.
To be sure I reviewed some of the apple documentation [1][2], and that
read quite like you _do_
really need the variable. So what is the truth now? :) Please
enlighten me. Do you really
need a special environment at run time when you use a library
installed by MacPorts? -- because
that's what it comes down to, effectively.

(Add-on question: are dynamic libraries usually "dependent libraries"
or are the "dynamically loaded
libaries" -- and how do you tell?)

Cheers,
Florian

[1] http://url.ie/ug8
[2] http://url.ie/uga


-- 
Florian Ebeling
Twitter: febeling
florian.ebeling at gmail.com


More information about the macports-dev mailing list