IOS 7.1 64bit run precompile lua file error, HELP

I create CocosLuaGame project from engine(cocos2dx 3.0 or 3.2 release). If I run the project in ios 7.1 x64bit simulator directly it is ok, but if I use luajit to precompile the lua file with command “luajit -b inputfile.lua outputfile.lua” then encountered below error message:
[[[[ cocos2d: [LUA ERROR] load “src/main.lua”, error: syntax error during pre-compilation.
cocos2d: [LUA ERROR] [string “require “src/main.lua””]:1: module ‘src/main.lua’ not found:
no field package.preload[‘src/main.lua’]src/main.lua: bad header in precompiled chunk ]]]].

This error happens on x64 bit simulator and iphone5s. It works fine on x32 bit simulator and other iphones.

Can anyone help? Great Thanks

1 Like

我也遇到相同的问题,相同的代码在iPhone4 7.1上可以正确运行

windows下文本编码的问题 文本要是UTF-8 without BOM就行

hi boy, you haved solution the problem? Please help me

Because luajit didn’t support iOS 64bit,so we use original lua library for iOS64.The parsing mechanism is different between luajit and original lua. It lead to this error.To solve it , cocos V3.3 provided luacompile tool to encrypt the lua script by xxtea encryption algorithm.