Share library question

Discussion in 'Mac Programming' started by ziyu4huang, Aug 6, 2006.

  1. ziyu4huang macrumors newbie

    Aug 2, 2006
    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 :
    /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 ?

Share This Page