RE: Including compiled lua Code in a pre-build application

  • From: William Adams <william_a_adams@xxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Wed, 25 Mar 2015 16:04:59 +0000

>> lua and luajit. Now I have a few questions. Would it be possible, for
>> example, to create a binary file of my game engine C++ code, then compile
>> the lua code with luajit and then included in my binary, without
>> having.The user of my game engine to have a compiler and linker on their
>> system? I'm just trying to figure out the best way to include lua code in


luajit -b filename.lua


will produce a filename.o file


You can then include this with all your other .o (or whatever files) when you 
link your program.


Then, from within your code, you can simply ... require ("filename") and magic 
will occur.


At least this is the way I build my TINN project.


-- William                                        

Other related posts: