0

When I try to open a binary executable file, I get:

dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib

After manually installing libpng with Homebrew, I next get a similar error (in the same dyld library):

dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib

After installing libjpeg with Homebrew, I get the infamous error:

Illegal instruction: 4

And, once again, the binary executable does not open. Now I am thinking about simply incorporating these two preprocessor directives into the src and recompiling the binary executable:

  1. A libpng preprocessor directive
  2. A libjpeg preprocessor directive

Is this a good approach and, if so, would it perhaps be possible to install the dyld library in one line altogether (instead of separately installing libpng and libjpeg and any other requisite components, as I received an Illegal instruction: 4 even after both were installed).

Can someone demonstrate a clean way to incorporate dyld library code into my src? I can provide a Github link to the src, if necessary.

warship
  • 2,924
  • 6
  • 39
  • 65

1 Answers1

0

dyld is not a library; it's the part of the operating system responsible for loading libraries. (To use the technical term, it's the dynamic linker in Mac OS X, similar to ld.so in Linux for instance.) The error messages you were receiving were dyld indicating that it could not load a library.

In any case, dyld is not something that you would (or even could!) "incorporate into your source". It is a core component of the C runtime on Mac OS X, and should be left alone.

The "illegal instruction" error you're getting indicates that your application is crashing. This is probably unrelated to the libraries you've installed, but we certainly cannot debug this "blind".