Debian from 7.0 to support the path of the multiarch,64-bit library to/usr/lib/x86_64-linux-gnu, mint, ubuntu These derivative versions have not been changed I am not clear.
Deepin Linux is based on Debian, so the library path is also/USR/LIB/X86_64-LINUX-GNU
# How to get Linux to load the dynamic library of the current directory
---------------------------
Linux excutable in the implementation of the default is to search the/lib and/usr/lib two directories, and then follow the ld.so.conf inside the configuration search absolute path, linux default is not in the current directory search dynamic library. When Windows loads a dynamic library, the default is to load the dynamic library in the local directory first, and then search the Windows/system and windows/system32 directories.
Windows ' Dynamic library search order, while potentially confusing, is undoubtedly convenient for development and testing, especially when the debug and release versions of dynamic libraries need to be switched frequently for testing. Linux Dynamic Library Search order although can be said to be more rigorous, but relatively rigid, and sometimes cause inconvenience.
In fact, Linux can also support "loading the dynamic library of the current directory." Just set the appropriate environment variable to Ld_library_path. There are three ways to set up the method:
1, temporary modification, log out after the failure
Executed in terminal: Export ld_library_path=./
2, so that the current account will be priority to load the current directory of the dynamic library
Modify ~/.bash_profile add two lines to the end of the file: ld_library_path=./and Export Ld_library_path
3, so that all accounts will first load the current directory of the dynamic library
Modify/etc/profile add two lines to the end of the file: ld_library_path=./and Export Ld_library_path
PS: Modifying ld.so.conf cannot achieve our goal, because ld.so.conf only supports absolute paths.
Original: http://blog.csdn.net/wwwsq/article/details/1256577
How to get Linux to load a dynamic library of the current directory