From the dlopen(3) man page:
- If, at the time that the program was started, the environment variable LD_LIBRARY_PATH was defined to contain a colon-separated list of directories, then these are searched. (As a security measure this variable is ignored for set-user-ID and set-group-ID programs.)
My reading of this is that changes to LD_LIBRARY_PATH
made while the program is running do not affect the search path. This also seems to be the case in practice when using DynamicLibrary
on my Linux machine.