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 下使用Makefile编译不过 #30

Open
hjcapple opened this issue Feb 18, 2014 · 3 comments
Open

在Mac OS X 下使用Makefile编译不过 #30

hjcapple opened this issue Feb 18, 2014 · 3 comments

Comments

@hjcapple
Copy link

posix/winfw.c:78:10: warning: unused variable 'buf' [-Wunused-variable]
char buf[BUFSIZE];
^
1 warning generated.
ld: unknown option: -E
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ej2d] Error 1

我的解决方法是,去掉macosx下的链接选项,-E, 也去掉了选项-Wl,
-Wl 选项保留的话,会有警告。
warning: unknown warning option '-Wl' [-Wunknown-warning-option]

也就是将,macosx: LDFLAGS修改成
macosx : LDFLAGS += -L/usr/X11R6/lib -lGLEW -lGL -lX11 -lfreetype -llua -lm -ldl

@cloudwu
Copy link
Contributor

cloudwu commented Feb 18, 2014

-E 去掉后会影响其它 lua C 库加载, 需要找到替代选项.

@solupro
Copy link

solupro commented Mar 6, 2014

我直接去掉 -E 编译以后运行example会提示错误 [1] 28163 segmentation fault ./ej2d examples/ex01.lua

@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