When linking with --rpath=. the shared library must be in the current directory. What I would want is that the shared library is looked up there where the application is.man 8 ld.so:
The dynamic linker understands certain token strings in an rpath specification (DT_RPATH or DT_RUNPATH). Those strings are substituted as follows:
$ORIGIN (or equivalently ${ORIGIN})
This expands to the directory containing the program or shared object. Thus, an application located in somedir/app could be compiled with
so that it finds an associated shared object in somedir/lib no matter where somedir is located in the directory hierarchy.gcc -Wl,-rpath,'$ORIGIN/../lib'
In reply to Re: How to setup the DynaLoader in a dynamically loaded perl?
by Anonymous Monk
in thread How to setup the DynaLoader in a dynamically loaded perl?
by sciurius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |