Friday, February 15, 2013

Your shared library and LD_LIBRARY_PATH

Libraries which are loaded dynamically at runtime are called shared object library in linux. They have .so extension. LD_LIBRARY_PATH is the path where your linux os looks for shared object library. Suppose you have your own libraries in the folder ~/mysharedlibs. In order to be able to use the libraries add this code to your .bashrc file.



if [ -d ~/mysharedlibs/ ];
then
    LD_LIBRARY_PATH=~/mysharedlibs/:$LD_LIBRARY_PATH
fi 

export LD_LIBRARY_PATH

References:

No comments:

Post a Comment