Lua - 'system' 在 iOS 中不可用

我在 xCode 9 中打开了一个使用 Lua 的 IOS Objective C 项目(在 xCode 8 中可以工作),但是我收到以下错误:

'system' 在 iOS 中不可用

ioslib.c enter image description here

我知道 'system' 在 iOS11 中不可用,但是我该如何解决这个 Lua 的问题? 这是一个我包含但并非我自己编写的库。

点赞
用户2482283
用户2482283

在 luaconf.h 中默认禁用:

#if defined(__APPLE__)
     #include "TargetConditionals.h"
     #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
         #define system(s) ((s)==NULL ? 0 : -1)
     #endif // end iOS
#elif defined(__ANDROID__)
     #define system(s) ((s)==NULL ? 0 : -1)
#endif
2020-07-19 09:44:02