dyld:库未加载,原因:找不到图像 [英] dyld: Library not loaded, Reason: image not found

查看:642
本文介绍了dyld:库未加载,原因:找不到图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到本周,我才正常使用gdb。现在运行gdb我看到:

 (gdb)r 
启动程序:/ Volumes / MyProg
dyld :Library未加载:@ rpath / libCore.so
引用自:/ Volumes / MyProg
原因:image not found
(gdb)

如何解决它?



我有:


  • OSX 10.9 使用MacPorts安装的GNU gdb(GDB)7.6


    PS



    我重新安装了gdb和Xcode。这没有帮助。



    我看到很多关于dyld问题的问题,但显然我缺乏OSX上的库经验,而且对我来说它们似乎没用。

    例如,这个主题:问题图书馆未加载
    但如何再次下载图书馆?



    或者这个主题: Dyld:Library未加载
    但是如何找出安装名称?什么是 @rpath

    解决方案

    p>


    1. libCore.so 是一个来自 ROOT框架,其中 MyProg 使用。

    2. 如果我理解正确,消息 Library未加载:@ rpath / libCore.so引用自:/ Volumes / MyProg原因:找不到图像表示链接程序找到该库,但可以't使用它。

    3. Root在安装过程中默认使用clang。同时我更喜欢gcc和 MyProg 使用gcc。

    4. 我已经使用gcc编译器重新安装了root:



      ./ configure --with-cxx = g ++ --with-cc = gcc --with-ld = g ++


    5. 我重新编译了 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:

    1. libCore.so is a library from ROOT framework, which MyProg uses.
    2. 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.
    3. Root, during installation uses clang by default. Meanwhile as I prefer gcc and MyProg uses gcc.
    4. I have reinstalled root with gcc compiler:

      ./configure --with-cxx=g++ --with-cc=gcc --with-ld=g++

    5. I have recompiled MyProg.

    and now I can debug it with gdb.

    这篇关于dyld:库未加载,原因:找不到图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆