【问题标题】:Lua - 'system' is unavailable: not available in iOSLua - “系统”不可用:在 iOS 中不可用
【发布时间】:2018-06-19 15:30:13
【问题描述】:

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

'system' is unavailable: not available in iOS

ioslib.c

我知道“系统”在 iOS11 中不可用,但如何使用 Lua 解决此问题?这是一个我已经包含的库,不是我自己写的。

【问题讨论】:

标签: ios xcode lua


【解决方案1】:

http://lua-users.org/lists/lua-l/2017-09/msg00242.html

在 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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-25
    • 1970-01-01
    • 2023-03-30
    • 2014-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多