On Sun, Apr 5, 2009 at 6:21 PM, James C. McPherson
<James.McPherson at sun.com> wrote:
> On Sun, 05 Apr 2009 16:12:25 -0700 (PDT)
> Paul Zubarev <pavel.zubarev at gmail.com> wrote:
>
>> Hi All,
>>
>> I intend to build the IPS package with the binary file linked with the shared
>> library being situated at the directory different from /usr/lib.
>>
>> Please suggest me how to point the directory contains the .so file I need.
>> I considered I have to use crle but I didn't understand how to append
>> the post installation script to the ISP package
>
>
> Why not compile the binary with your desired library's
> location already "baked in" ?
>
> LDFLAGS+="-R/path/to/library -L/path/to/library"
> LDLIBS+="-Lmylibrary"
>
> the -R arg tells the compiler to tell the linker that
> /path/to/library needs to be "baked in" to your binary.

You may also consider -R../lib.  This allows fairly arbitrary
placement of the executable and library (e.g. as in user images)
without having to resort to evil things like LD_LIBRARY_PATH.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/

Reply via email to