0

In linux (like ubuntu), I set LIBRARY_PATH and LD_LIBRARY_PATH in my bash.bashrc file. But it seems that ld command does not search for that path. I run '$ ld -l --verbose' and it only search for default paths defined in /etc/ld.so.conf.d/*.conf Why this happened? If I have to add -L option every time I compile, why $LIBRARY_PATH is needed? Or did I miss something? Thanks.

  • Your answer may be in https://stackoverflow.com/questions/38172362/library-path-environment-variable-not-being-used-read-with-gcc – Chadversary Dec 19 '17 at 00:20

1 Answers1

0

LIBRARY_PATH is not used by the tool chain.

LD_LIBRARY_PATH is not used by ld, but by the dynamic linker/loader ld.so.

Armali
  • 18,255
  • 14
  • 57
  • 171