LD_RUN_PATH && LD_LIBRARY_PATH

2019-07-13 01:18发布

LD_LIBRARY_PATH Specifies the directories that are to be searched for libraries at run time. LD_RUN_PATH Specifies the directories that are to be searched for libraries at both link and run time.
For example, if you installed the ESSL 32-bit libraries in /home/me/lib, you would issue ksh commands similar to the following in order to compile and link a program:      LD_LIBRARY_PATH=/home/me/lib: $LD_LIBRARY_PATH
    LD_RUN_PATH=/home/me/lib: $LD_RUN_PATH
    export LD_LIBRARY_PATH
    export LD_RUN_PATH
    xlf_r -o myprog myprog.f -lessl The result would be that the /home/me/lib directory is the directory that gets searched at link time and run time.