Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X 下编译时不支持通过 Homebrew 安装的 freetype2 #39

Open
kfihihc opened this issue Mar 4, 2014 · 4 comments
Open

Comments

@kfihihc
Copy link

kfihihc commented Mar 4, 2014

gcc -g -Wall -Ilib -D EJOY2D_OS=MACOSX -I/usr/X11R6/include -I/usr/include -I/usr/local/include -I/usr/local/Cellar/freetype/2.5.2/include/freetype2 -D __MACOSX -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib/lparticle.c lib/scissor.c posix/window.c posix/winfw.c posix/winfont.c -L/usr/X11R6/lib  -lGLEW -lGL -lX11 -lfreetype -llua -lm -Wl,-E -ldl
In file included from posix/winfont.c:7:
/usr/X11R6/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
         ^
1 error generated.
make: *** [ej2d] Error 1

需要添加一个软链接: ln -s /usr/local/include/freetype2 /usr/local/include/freetype

@solupro
Copy link

solupro commented Mar 6, 2014

我也遇到了这个问题,感谢提供方法!

@zxhfirefox
Copy link

@kfihihc , 加了这个貌似还是不能编译。。。

@zxhfirefox
Copy link

@kfihihc ,感觉更像是X11R6那个头文件需要更新的样子。

@Tsiannian
Copy link
Contributor

可以尝试使用mac目录下的xcode工程进行编译,或者参考工程设置修改命令行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants