Operating System - HP-UX
1753580 Members
6319 Online
108796 Solutions
New Discussion

Re: Shared Library Options

 
Vladstone
New Member

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 1
Dennis Handly
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.