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?
I solved this issue with "Embedded Binaries" in the General project settings.
i have solved this issue by changing the following settings
Go to Project Setting Your_Target->General->Embedded Binaries-> Click on + button and add your library here
How I fixed it:
libCore.sois a library from ROOT framework, whichMyProguses.- If I understand correctly, the message
Library not loaded: @rpath/libCore.so Referenced from: /Volumes/MyProg Reason: image not foundmeans that linker found the library, but can't use it. - Root, during installation uses clang by default. Meanwhile as I prefer gcc and
MyProguses gcc. I have reinstalled root with gcc compiler:
./configure --with-cxx=g++ --with-cc=gcc --with-ld=g++
I have recompiled
MyProg.
and now I can debug it with gdb.
来源:https://stackoverflow.com/questions/20455492/dyld-library-not-loaded-reason-image-not-found