lua-users home
lua-l archive

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


On Sat, Oct 23, 2010 at 7:17 PM, Michael Newberry
<mnewberry@mirametrics.com> wrote:
> We updated to Lua 5.1.4 and our Windows app fails trying to load a
> pre-compiled lua library. Specifically, luaL_loadfile() returns 3 and the
> error message is "bad header in precompiled chunk". This library was created
> using luac.exe dated March 19 2004 (114,688 bytes). I found a reference to
> what may be the same issue posted by David Manura on 22 Sep 2010. Does
> anyone know a workaround?

What did you update *from* ?

Precompiled code is tied to the Lua version (e.g 5.0 or 5.1) that it
was compiled for, the machine endianness, the lua_Number type, and
sizes of some fundamental types (e.g. sizeof(int), sizeof(size_t)). If
any of these things differ between where the code was compiled and
where the precompiled code is loaded, then the loading will fail with
the message you gave.