in reply to Re: ENV setting for library loading failure
in thread ENV setting for library loading failure

So is there a work around? short of setting the environment and invoking a child copy of self? nevermind that doesn't work.

Be Appropriate && Follow Your Curiosity
  • Comment on Re^2: ENV setting for library loading failure

Replies are listed 'Best First'.
Re^3: ENV setting for library loading failure
by traveler (Parson) on Jan 26, 2006 at 00:04 UTC
    Of course :-) If you are root on a linux machine (maybe others, dunno) you can use ldconfig to put the library directory into the system default path. You could make a shell wrapper for your script. You could make a C or other high-level language wrapper.

    I have not looked to see how to do binary plugins in perl. It can be done in C, so it can probably be done in perl. Binary plugins allow the application (perl) to link to a shared library defined at run time. I've done in in C, but there must be a perl way, Maybe someone with experience in that space can help you. In my experience it is not simple and the other techniques are likely easier to create and maintain.

      Oh, Duh, you do it (dynamic loading of DLLs)with DynaLoader if you have that. Silly me. But the other ways are still probably better. Time to go for a beer.
Re^3: ENV setting for library loading failure
by Fletch (Bishop) on Jan 25, 2006 at 23:39 UTC

    Rebuild your perl so that it looks in /usr/local/lib (I believe something along the lines of -R/usr/local/lib to the link options).

Re^3: ENV setting for library loading failure
by CountOrlok (Friar) on Jan 26, 2006 at 09:27 UTC