On 2017-06-01 09:56:29 +0200, Thomas Jahns wrote: > GCC doesn't generate binaries or shared libraries, ld does. Passing > > -Wl,-rpath,/path/to/dependency/lib
But this is not automatic. When typing $CC program.c -o program -lmpfr -lgmp (where $CC can be gcc, tcc or icc, for instance), things should just work, i.e. the correct options should be passed to ld *by default*. Perhaps defining the LD_RUN_PATH environment variable instead of LD_LIBRARY_PATH could be a workaround, but gold does not support it, so that this cannot be a general solution. Moreover, what path should be given when the library is on NFS, where the mount point (e.g. $HOME directory) depends on the machine? Note that it is important that several machines can be used at the same time, e.g. for parallel computing on a network of machines. > will do just what's needed (for most people on this list libtool > does so for them). libtool is used to compile libraries, but in general, the user does not use it to build an executable. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool