lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi - I've been using Lua for a few months and have decided to precompile my lua before it is packaged as part of my application.

I'm using Lua5.2 with OSX Lion as my host OS and iOS as my target OS. I have tried a pretty trivial test and have compiled one of my lua source files with luac:

luac -o credits2.lua credits.lua

When I load the compiled file with luaL_loadfile() I get the following error (using my own debug stack print code):

2012-01-10 22:50:30.012 CR1[4630:1bb03] -- FCLuaVM:dumpStack (0x0a8368b0) --
2012-01-10 22:50:30.014 CR1[4630:1bb03] (1/-2) string 'lua/credits3'
2012-01-10 22:50:30.015 CR1[4630:1bb03] (2/-1) string '/Users/link/Library/Application Support/iPhone Simulator/5.0/Applications/965EE29E-09E2-447F-ABDA-ECD55EFEC302/ incompatible precompiled chunk'
2012-01-10 22:50:30.016 CR1[4630:1bb03] FATAL - /Users/link/GitDepot/Code/CR1/../../../GitHub/FC/Lua/ common_LoadScriptForState:58 - Syntax error on load of Lua file 'lua/credits3'

Can anyone shed some light on what is going wrong ? Documentation about luac seems thin on the ground and the error message on the stack isn't exactly telling me anything useful...

Thanks for any suggestions or links to relevant info.

- Martin