0

I am using wax.framework (note: it's a framework file) in my iOS project, but i don't know how to load my byte code files when using wax.framework. This link (https://github.com/probablycorey/wax/wiki/Luac) said it can load byte code files, does somebody know how to do it?

RBerteig
  • 41,948
  • 7
  • 88
  • 128

1 Answers1

0

I don’t know about wax.framework but Lua byte code files can be loaded transparently by Lua just use the same commands you use for loading source files.

(Strictly speaking, Lua 5.2 does allow an application to limit the kind of files it is willing to load. I don’t know whether wax.framework does that.)

lhf
  • 70,581
  • 9
  • 108
  • 149
  • You are right, it's a mistake of my compiled lua file, iOS need 32-byte and my compiled file are 64-byte. also i am not test yet, can you tell me how to install 32-byte lua in my MAC OS 10.8? or how to compile lua source file with 32-byte? – user1822919 Jan 14 '14 at 09:16
  • i get a msg "bad header in precompiled chunk" when i use compiled lua file like *.out – user1822919 Jan 14 '14 at 09:51
  • 2
    @user1822919, you need luac running in the same architecture as iOS. This may not be easy, I don’t know. Do you really need precompiled files? – lhf Jan 14 '14 at 09:54