As far as I can see, the -rpath option with relative path sets the
searching directory relative to current one. Is there any way to set the
directory relative to the executable location? I've seen something about
@loader_path and @executable_path, but couldn't find any documentation
on this.
BTW, why the relative directories in -rpath are relative to the current
directory, and not to the location of executable?
--
Minds, like parachutes, function best when open
> As far as I can see, the -rpath option with relative path sets the
> searching directory relative to current one. Is there any way to set
> the directory relative to the executable location? I've seen
> something about @loader_path and @executable_path, but couldn't find
> any documentation on this.
man ld.so:
"ld.so understands the string $ORIGIN (or equivalently ${ORIGIN}) in
an rpath specification (DT_RPATH or DT_RUNPATH) to mean the directory
containing the application executable."
> BTW, why the relative directories in -rpath are relative to the current
> directory, and not to the location of executable?
That's ancient history. Maybe no-one knows any more.
Andrew.
Thank you. I've checked the man for ld, but forgot about ld.so. Silly :)