2 ms·
Two things: 1. You can bake the LD_LIBRARY_PATH into your executable with the -rpath mechanism. 2. Both rpath and LD_LIBRARY_PATH expand certain tokens such a
by kazinator 2y ago
Two things:
1. You can bake the LD_LIBRARY_PATH into your executable with the -rpath mechanism.
2. Both rpath and LD_LIBRARY_PATH expand certain tokens such as $ORIGIN. $ORIGIN expands to the location of the program.
So you can (for instance) set a rpath of $ORIGIN in your executable, and then it will look for its libs in its own directory. Just like is the intelligent default on on you-know-what Redmond operating system everyone rags on.