dyld:库未加载,原因:找不到图像 [英] dyld: Library not loaded, Reason: image not found
问题描述
(gdb)r
启动程序:/ Volumes / MyProg
dyld :Library未加载:@ rpath / libCore.so
引用自:/ Volumes / MyProg
原因:image not found
(gdb)
如何解决它?
我有: PS 我重新安装了gdb和Xcode。这没有帮助。 我看到很多关于dyld问题的问题,但显然我缺乏OSX上的库经验,而且对我来说它们似乎没用。
例如,这个主题:问题图书馆未加载
但如何再次下载图书馆?
或者这个主题: Dyld:Library未加载
但是如何找出安装名称?什么是 @rpath
?
p>
-
libCore.so
是一个来自 ROOT框架,其中MyProg
使用。 - 如果我理解正确,消息
Library未加载:@ rpath / libCore.so引用自:/ Volumes / MyProg原因:找不到图像
表示链接程序找到该库,但可以't使用它。 - Root在安装过程中默认使用clang。同时我更喜欢gcc和
MyProg
使用gcc。 -
我已经使用gcc编译器重新安装了root:
./ configure --with-cxx = g ++ --with-cc = gcc --with-ld = g ++
-
我重新编译了
MyProg
。
现在我可以使用gdb进行调试。
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
?
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.
这篇关于dyld:库未加载,原因:找不到图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!