Linux/UNIX真心不错,就是library的更新太头疼了。几乎不可能象windows一样有个通用万能的安装包
从网站下载SFML 2.0rc for Mac OS X标准安装包,安装后无论是直接链接/usr/local/lib/libsfml-xxx.dylib还是按标准教程新建Xcode SFML Template,都无法编译,很无奈的错误:
ld: library not found for -lsfml-system-d,或者
'SFML/Graphics.hpp' file not found
第一个是#212 (when not using framework)
https://github.com/LaurentGomila/SFML/issues/212
第二个是#233(when use framework),introduced from Xcode 4.3.3
https://github.com/LaurentGomila/SFML/issues/233
somehow didn't work for me. Just manually add /Library/Frameworks
to the framework search path solved the problem - obviously!
第三个是#285/#287,related to C++11, clang and libc++.
https://github.com/LaurentGomila/SFML/issues/287
Solution: changing the compiler from "Apple LLVM 4.1" to "LLVM GCC 4.2"