[ LUGOS ] ld ne najde libX11

Metod Kozelj metod.kozelj na rzs-hm.si
Sre Dec 10 16:31:15 CET 1997


Howdy!

On Wed, 10 Dec 1997, Andrej Presern wrote:

> Linker oz. ld v program obicajno ne shrani direktne poti do knjiznic,
> ampak le navede njihova imena in verzije, iskanje konkretne poti do
> knjiznice pa prepusti interpreterju, saj nimajo vsi sistemi knjiznic
> shranjenih na istem mestu, kar bi ob binarni distribuciji seveda
> povzrocalo nemalo preglavic.

No, obicajno morda res ne, mozno pa je. man ld(1):

/\/\/\/\/\/\
       -rpath directory
              Add a directory to the runtime library search path.
              This is used when linking an  ELF  executable  with
              shared  objects.  All -rpath arguments are concate-
              nated and passed to the runtime linker, which  uses
              them  to  locate  shared  objects  at runtime.  The
              -rpath option is also used when locating shared ob-
              jects which are needed by shared objects explicitly
              included in the link; see the  description  of  the
              -rpath-link  option.   If  -rpath  is not used when
              linking an ELF executable, the contents of the  en-
              vironment  variable  LD_RUN_PATH will be used if it
              is defined.
/\/\/\/\/\/\/\

Ce linkerju eksplicitno poves, katero knjiznico naj linka (recimo
/pot/do/mojih/knjiznic/libmoja.so), potem celo pot zapise v executable.

Peace!
  Mkx




Dodatne informacije o seznamu Starilist