ejoy / ejoy2d

A 2D Graphics Engine for Mobile Game
MIT License
1.98k stars 643 forks source link

Mac Xcode 链接出错 #98

Closed ray2011 closed 7 years ago

ray2011 commented 8 years ago
  1. make 成功,测试文件可以正常运行
  2. ios, Xcode运行成功
  3. mac, Xcode 链接报错

`Ld /Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Products/Debug/example normal x86_64 cd /Users/gjy/Desktop/i/github/ejoy2d/mac/example export MACOSX_DEPLOYMENT_TARGET=10.9 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Products/Debug -L/usr/local/lib -F/Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Products/Debug -filelist /Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Intermediates/example.build/Debug/example.build/Objects-normal/x86_64/example.LinkFileList -mmacosx-version-min=10.9 -lglfw3 -lfreetype -lm -Wl, -ldl -framework OpenGL -Xlinker -dependency_info -Xlinker /Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Intermediates/example.build/Debug/example.build/Objects-normal/x86_64/example_dependency_info.dat -o /Users/gjy/Library/Developer/Xcode/DerivedData/example-gypspdlpnzaphsafhkxhrqygrhej/Build/Products/Debug/example

Undefined symbols for architecture x86_64: "_lua_insert", referenced from: __new in lparticle.o "_lua_replace", referenced from: _ltest in lsprite.o _lookup in lsprite.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

`

cloudwu commented 8 years ago

lua_insert 在 lua 5.3 是一个宏定义, 只定义在 lua 5.3 的 lua.h 里, 所以链接是不可能找到符号的.

你的 lua 版本(文件路径配置)有问题, 自己查.

ray2011 commented 8 years ago

谢谢,更新lua版本到5.3.2以后问题解决

atlas-comstock commented 7 years ago

@suzuiyuegjy 问题解决后可以关 issue 了。