SFML 2.1 Undefined symbols for architecture x86_64 error

风流意气都作罢 提交于 2019-12-05 15:21:14
busebd12

I figured it out at last! First off, as Joachim Pileborg pointed out, I need to install the clang version of SFML for mac since I was using g++ to compile which is clang++ in disguise, as Joachim Pileborg also pointed out. Next, I had to go through the instructions again for setting up SFML with Linux (http://www.sfml-dev.org/tutorials/2.0/start-linux.php).

However, the icing on the cake was when I read this question:

OSX GCC how to specify sfml library source?

...and this question:

FreeType error when building in XCode

...which got me thinking: maybe I should try moving my freetype.framework folder (which can be found in the extlibs directory) into my /Library/Frameworks directory. Once I did this and compiled using

g++ window.cpp -framework sfml-graphics -framework sfml-window -framework sfml-system

It compiled and ran successfully!!! I am very happy now!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!