0

From What is the significance of a macOS Mach-O dylib LC_ID_DYLIB name, or install_name? I understand that LC_ID_DYLIB sets the path at which to find the dylib at runtime, which is not the same as the dylib's build path. My:

otool -L /usr/local/lib/libTest.dylib

returns:

cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
   time stamp 2 Wed Dec 31 21:00:02 1969
      current version 400.9.4
compatibility version 1.0.0
Load command 10
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
   time stamp 2 Wed Dec 31 21:00:02 1969
      current version 1252.200.5
compatibility version 1.0.0
Load command 11

My dylib file is located in /usr/local/lib but the otool -L returns LC_LOAD_DYLIB path to /usr/lib/ and references libc++.1.dylib and libSystem.B.dylib. What these libraries have to do with my libTest.dylib file and is the runtime path for libTest.dylib correctly set?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.