Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ziyu4huang

macrumors newbie
Original poster
Aug 2, 2006
4
0
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 ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.