topameng/tolua_runtime

Luajit在ios11上编译失败

Closed this issue · 3 comments

ios11已经禁用了system函数,然后就不能编译了。

lib_os.c:52:14: error: 'system' is unavailable: not available on iOS
int stat = system(cmd);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdlib.h:195:6: note: 'system' has been explicitly marked unavailable
here
int system(const char *) __DARWIN_ALIAS_C(system);
^
1 error generated.
make[1]: *** [lib_os.o] Error 1

在build_ios.sh的make选项里加上-DLJ_NO_SYSTEM=1就可以了

也行,不过xcode也强制要求8.0版本了,新的xcode要求更高了

不只是ios,osx上的system也被禁了