A new Mac laptop with OSX 10.13 with Xcode 9 on it gets run time errors from a cloned the project that runs fine 10.8 OSX and Xcode 5

The C++ project throws Run-Time-Exception against one of the dylib's that are part of my project saying they can not be found in /usr/local/lib.

Below is the image trying to run the program on the new machine under new Xcode:

enter image description here

Below is a screenshot of trying to run the program from the Terminal:

enter image description here

Those are instructions I followed to create the original project on the old machine.

How do I fix this runtime?

  • 1
    There is too much detail missing to generate meaningful answers. Also depending on the problem itself SO might be the better place to ask. But even there sharing the Github repository link (assuming it‘s public) and some more information about the build process/configuration will be required.
    – nohillside
    Jun 27, 2019 at 4:03
  • @nohillside, what details do you need? On both laptops I open the Xcode project, then hit Cmd + B to build it and then Cmd + R to run it. The configuration I am trying is currently Debug. And the repo is not public - still developing the project. If you need more details - just ask. I will be happy to provide as much of it as possible.
    – Igor
    Jun 27, 2019 at 4:40
  • Also, when I run the binary from Xcode I have just a crash. In order to get something meaningful, I ran the program from the Terminal, where I got the nice window with the crash report and the message Can't find the <library_name> inside /usr/local/lib. Unfortunately Xcode does not provide the install functionality to make the dylib copy to /usr/local/lib and I presume it was done automatically on the old machine where the project was created.
    – Igor
    Jun 27, 2019 at 4:43
  • Right now the only possible answer is "there is something missing in your build scripts and/or configuration". It might even be that you copied the missing library manually and just don't remember anymore (happens to me all the time). So without a lot more insights into your build scripts/config the problem can be more or less "anything".
    – nohillside
    Jun 27, 2019 at 5:11
  • 1
    /usr/local files are ones that you installed not from Apple. You have it installed on your first mac but you have not installed it on the second. (Note to bmike the original question made this clearer and I think you fix the missing/bad library first - Xcode is not crashing - the program that is built is the thing that crashes.)
    – mmmmmm
    Jun 29, 2019 at 10:13

1 Answer 1


The first place to start would be checking the health and presence of the file in the dyld error:


Or fix the linking errors by changing what libraries the project expects.

  • ♦, the file is not present inside /usr/local/lib. And the project does build correctly - otherwise it would be impossible to run.
    – Igor
    Jun 30, 2019 at 0:57
  • Sorry - I had a different context for "build correctly". I never think of the build as just to get an exit from the compiler, but that you can execute the program. Building a binary that can't even start seems like a participation medal of sorts.
    – bmike
    Jun 30, 2019 at 14:33

Not the answer you're looking for? Browse other questions tagged .