dyld: Library not loaded, Reason: image not found

Viewed 42436

I used gdb normally until this week. Now running gdb I see:

(gdb) r
Starting program: /Volumes/MyProg 
dyld: Library not loaded: @rpath/libCore.so
  Referenced from: /Volumes/MyProg
  Reason: image not found
(gdb) 

How to fix it?

I have:

  • OSX 10.9
  • GNU gdb (GDB) 7.6 installed with MacPorts

P.S.

I have reinstalled gdb and Xcode. This does not help.

I see a lot of questions about dyld issues, but obviously I lack experience with libraries on OSX, and they appears to be useless for me.

For example this topic: dyld issues library not loaded But how to download library again?

Or this topic: Dyld: Library not loaded But how to find out install name? What is @rpath?

5 Answers

For Xcode 11 or above, there is another simpler solution which worked for me if you are using Cocoapods.

In your Podfile, add use_frameworks! after your Target line like this -

target 'YourAppName' do
  use_frameworks!

Basically it adds all your pods as a framework in your framework folder.

Related