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.
Asked
Active
Viewed 408 times
0
-
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