7

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?

Kam
  • 5,878
  • 10
  • 53
  • 97

1 Answers1

9

Seems runpath is set to the -Wl value if you pass --enable-new-dtags

http://blog.tremily.us/posts/rpath/

This links seems to suggest the difference in use for rpath and runpath seems to be their order in the search list:

http://en.wikipedia.org/wiki/Rpath

Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89