Situation: I’m making an app for iOS and Android using Flash Builder 4.7 and AIR SDK 4.0. It includes the Lua 5.2 interpreter as compiled from C code into a SWC using CrossBridge (formerly FlasCC). I’m just using the lua.swc file from the crossbridge samples. However, apparently there’s some problem with the multithreading code or something (is multithreading even supported in AIR 4.0? I don’t remember), because I get the following run-time error when debugging on the device (not on Android or AIR simulator, just iOS):
Error #1520: Mutex cannot be initialized.
Solution: I don’t know why this works, but if you add the following compiler options:
--swf-version=17
It works. This probably means I’m targeting an older flash player and one day I will need to figure out how to get the Lua interpreter code.
Here’s a pretty picture of the box where you enter the code in Flash Builder 4.7: