4 ms·
Completely off topic but thank you ! I was starting C programming and I was wondering how to check an executable dependencies. If I were to package an executabl
by aikah 11y ago
Completely off topic but thank you ! I was starting C programming and I was wondering how to check an executable dependencies. If I were to package an executable which was dynamically linked to use it on another computer without recompiling binaries, how could I proceed ? does ldd show the dependencies of the dependencies too ? Would it be sufficient to put all shared libraries into the same folder as the executable ? thanks.
- lawl 11y agoI think ldd should show this, not sure though. And you can't just put them in the same folder, the thing you want to look up is LD_LIBRARY_PATH.
- pritambaral 11y agoEven better, one can embed the relative path to dynamic libraries by editing the RPATH or RUNPATH attributes in the binary (and using $ORIGIN in the path). Check out chrpath and patchelf.