PDA

View Full Version : Share library question




ziyu4huang
Aug 7, 2006, 12:58 AM
I found it's is a little odd that dyld behavior is different under gdb.
for example, I try to build a program with share library, via otool -L options, I can see :
../../libMyFooLib.dylib
/usr/lib/...{some standard lib}

You can see the share lib infomation of my own library is not absolute path, it's relative path. But in the run time, the share library may not be the always be availible as otool shows. I can fix it by set DYLD_LIBRARY_PATH. But it seems not work under gdb. Does anybody know how to force GDB find the share lib in specific path when it fail to load the share lib info stores in Mach-O format ?