There are countless threads describing what is RPATH
, RUNPATH
and LD_LIBRARY_PATH
and how they interact in order to resolve libraries' location.
To set RPATH
use gcc options:
-Wl,-rpath,/path/to/dir
To set LD_LIBRARY_PATH use:
export LD_LIBRARY_PATH= <path of lib>
What I cannot find is how to set RUNPATH
?