08-16-2011 10:01 AM
Is there anyway to set up a c++ application that searches for a function in shared libraries as follows:
1) Look in the shared library in the current directory
2) If not found in the current directory's shared library look for a shared library of the same name on the search path and try to find the function there.
08-16-2011 11:09 AM
Are you talking about searching at link time, load time or at runtime?
The first can be done with -L path options.
The second with LD_LIBRARY_PATH and -Wl,+b paths
The third with dlopen and dlsym.