【发布时间】: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
【问题讨论】: