【问题标题】:Makefile won't compile project using sfml on MacMakefile 不会在 Mac 上使用 sfml 编译项目
【发布时间】:2016-11-04 20:07:57
【问题描述】:

我正在尝试使用基于 SFML 的自定义 C 库来编译我的项目之一。

我在 Ubutun 上用我的 Makefile 编译我的项目没有问题,但是使用 Mac OS X,我不断收到这些错误:

ld: warning: ld: warning: ld: warning: ignoring file /Users/$USER
/.froot/lib/libsfml-audio.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) 

ld: file too small (length=8) file '/Users/$USER/.froot/lib/mylib.a' for architecture x86_64

我的编译标志是:

-L/Users/$USER/.froot/include \
-L/Users/$USER/.froot/lib \
-lmylib -lsfml-audio -lsfml-graphics -lsfml-window \
-lsfml-system -lstdc++ -ldl -lm -lpthread

【问题讨论】:

    标签: macos makefile sfml


    【解决方案1】:

    您还需要在 Mac 上编译 SFML:*.so 仅适用于 linux -- 这就是错误所指的内容。

    【讨论】:

    • 我该怎么做?
    • 我成功编译了 SFML,但现在出现此错误:ld: file too small (length=8) file '/Users/$USER/.froot/lib/mylib.a' for architecture x86_64
    猜你喜欢
    • 2014-12-14
    • 2012-02-21
    • 2013-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多