04-18-04 07:34 PM
"Avi Uziel" <ouziel_a@hotmail.com> wrote in message
news:1085ei6o019aq94@corp.supernews.com...
> Hi All,
>
> My environment is:
> Solaris 8, with Sun WorkShop 6 update 2 C++ 5.3.
>
> I'm writing a plugin for third party application. The plugin is a shared
> object which the
> third party application loads by using dlopen.
>
> My plugin is using another third party shared object (libACE.so).
> The problem is that when the plugin is loaded the ld fail to locate
> libACE.so.
>
> 3rd party application -> dlopen my plugin -> use libACE.so
>
> I tried LD_LIBRARY_PATH - the third party application ignore this env
> variable.
> I tried to compile my plugin so with -R and point to the libACE.so
> location - is the -R path must be
> absolute or can it be relative? if relative then to who - is it to my
plugin
> so or to the application
> executable?
>
> The only thing that work was compiling my plugin with -R and abselot path
to
> libACE.so - this is
> not a good practice, since I can't know in compilation time the location
of
> libACE.so.
>
> any suggestions?
>
> Thanks
> Avi
>
LD_LIBRARY_PATH is only read during exec(). If you're setting it after you
have started your program, you're wasting your time. The way to get around
this is to check LD_LIBRARY_PATH, if it is not correct, then set it, and
then exec your program agian (without forking).
--
Fletcher Glenn
[ Post a follow-up to this message ]
|