Find a directory in shared library search path
问题 I want dlopen() every shared library in a specific directory. In order to do that, what is the cleanest way to retrieve linux's library search path. Or Is there a quicker way of find a specific directory in that path ? posix would be better. 回答1: POSIX does not support a mechanism to find out the directories on the shared library search path (it does not mandate LD_LIBRARY_PATH , for example), so any solution is inherently somewhat platform specific. Linux presents some problems because the