How to set the path of shared library in Linux

Daniel Jacobowitz drow@false.org
Wed Feb 27 05:49:00 GMT 2008


On Wed, Feb 27, 2008 at 11:16:19AM +0800, Robert Bu wrote:
> As you can see GDB always tries
> "/home/STools/RLX/scv-1.0p2-sysc-2.2.0-gcc-3.2.3/lib-linux/" instead of
> using "/home/robert_bu/local/rlxvm_static_gcc323/lib" as I set.
> 
> However, If I set this path to LD_LIBRARY_PATH, GDB can find it
> successfully.

GDB uses solib-search-path to find libraries for debugging.  It
doesn't affect what libraries your program uses when it runs, so you
do have to use LD_LIBRARY_PATH.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list