我正在尝试使用基于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
发布于 2016-07-03 09:50:42
您还需要在Mac上编译SFML:*.so
仅适用于linux --这就是错误所指的。
https://stackoverflow.com/questions/38161896
复制相似问题