Thursday, April 05, 2007

loading shared libraries with gdb

While trying to validate a particular utility which uses a shared library (which again was developed by me and resides in user-specified path), gdb reported error that it was not able to find the shared library (although compiling the utility was not a problem). ldd also was not able to find the library, although i had used ldconfig -n /path/to/lib/dir and properly created the soname.

After some googling, I found that gdb was trying to use the ld.so.conf directory and its contents to search for the shared library objects. So, I added my path to /etc/ld.so.conf/ directory. After this, the shared object loaded without any complaint.

mmMmm...

No comments: