BladeSystem Forums have moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Showing results for 
Search instead for 
Do you mean 

Shared Library Options

Highlighted
Occasional Visitor

Shared Library Options

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.

 

Thanks,

1 REPLY
Acclaimed Contributor

Re: Shared Library Options

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.