how application know if I copy shared library into user defined directory instaed of /lib directory - Linux

This is a discussion on how application know if I copy shared library into user defined directory instaed of /lib directory - Linux ; I have a linux application (it uses shared library), If I copy shared library into /lib Directory, the application works, where as if I copy into other directory, then it won't work, how can I inform my application look for ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how application know if I copy shared library into user defined directory instaed of /lib directory

  1. how application know if I copy shared library into user defined directory instaed of /lib directory

    I have a linux application (it uses shared library), If I copy shared
    library into /lib Directory, the application works, where as if I copy
    into other directory, then it won't work, how can I inform my
    application look for that shared library into private dirctoiry instaed
    of /lib directory, appreciated for some clue.

    Thanks in advance.


  2. Re: how application know if I copy shared library into user defineddirectory instaed of /lib directory

    GS wrote:
    > I have a linux application (it uses shared library), If I copy shared
    > library into /lib Directory, the application works, where as if I copy
    > into other directory, then it won't work, how can I inform my
    > application look for that shared library into private dirctoiry instaed
    > of /lib directory, appreciated for some clue.
    >
    > Thanks in advance.
    >

    Set the LD_LIBRARY_PATH environment variable to the (colon-separated)
    list of extra directories where to search.
    So in your case try

    LD_LIBRARY_PATH= application

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


+ Reply to Thread