Operating System - HP-UX
1754355 Members
5046 Online
108813 Solutions
New Discussion юеВ

C & dynamic libraries....

 
SOLVED
Go to solution
Ciro  Iriarte
Valued Contributor

C & dynamic libraries....

Hi, what would be the correct way to setup additional directories to look for shared libraries?.

The idea is not to use LD_LIBRARY_PATH but the equivalent in HPUX to "ldconfig" in Linux or "crle" in Solaris.

Regards,
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: C & dynamic libraries....

(The correct HP-UX terminology is shared libraries.)

You can either link with -L path and these will be included in the runtime lookup paths (rpath). Or you can link with +b path_list.
Ciro  Iriarte
Valued Contributor

Re: C & dynamic libraries....

Defining the library path at compilation time for each binary is the only "best practices" approach we have?, isn't there any system wide solution not involving shell variables?..
Dennis Handly
Acclaimed Contributor
Solution

Re: C & dynamic libraries....

>Defining the library path at link time for each binary is the only "best practices" approach we have? Isn't there any system wide solution not involving shell variables?

Those are the two solutions.
You of course can put your shlibs in /usr/lib/, or use $ORIGIN.