【问题标题】:Installing SFML on CodeLite using Mac使用 Mac 在 CodeLite 上安装 SFML
【发布时间】:2018-12-22 23:23:31
【问题描述】:

我在使用 CodeLite for C++ 的 Mac 上尝试安装 SFML 库。我遵循了一个教程(在此处找到:https://en.sfml-dev.org/forums/index.php?topic=18820.0),在完成教程所说的所有操作后出现以下错误:

dyld: Library not loaded: @rpath/libsfml-graphics.2.5.dylib
 Referenced from: /Users/willbur/Desktop/School/CompSci142/SFML- 
Demo/Debug/SFML-Demo
 Reason: image not found
Abort trap: 6

有谁知道如何解决这个问题?我将所有 .dylib 文件复制到调试文件夹中,但仍然出现错误。 SFML 版本是 2.5 MacOS Clang。

谢谢!

【问题讨论】:

    标签: c++ sfml codelite


    【解决方案1】:

    遇到同样的问题后,我删除了我下载的 SFML 版本并使用 Homebrew 重新安装

    brew install sfml
    

    Homebrew 会自动将 sfml 文件夹放在:

    /usr/local/Cellar/sfml/{installed_version_number}/
    

    从这里开始以与您遵循的所列教程相同的方式设置您的项目,除了将编译器包含路径替换为:

    /usr/local/Cellar/sfml/{installed_version_number}/include
    

    以及链接器库搜索路径:

    /usr/local/Cellar/sfml/{installed_version_numer}/lib
    

    您也可以按照此资源进行设置:SFML with CodeLite on Mac OS

    【讨论】:

      猜你喜欢
      • 2016-05-08
      • 1970-01-01
      • 2013-04-29
      • 2013-09-25
      • 2017-07-21
      • 2019-11-17
      • 2019-11-13
      • 2010-10-18
      • 2017-07-25
      相关资源
      最近更新 更多