dyld: Library not loaded ... Reason: Image not found
How I fixed it:
libCore.so
is a library from ROOT framework, whichMyProg
uses.- If I understand correctly, the message
Library not loaded: @rpath/libCore.so Referenced from: /Volumes/MyProg Reason: image not found
means that linker found the library, but can't use it. - Root, during installation uses clang by default. Meanwhile as I prefer gcc and
MyProg
uses 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.
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
I solved this issue with "Embedded Binaries" in the General project settings.
You can find more information about rpath here: link
So you need to point the path to your libCore.so, but honestly I have not faced with this library so I don't know where is it located.
You can check also this answer to understand what it is rpath: answer