Re: Creating a statically linked executable for a LuaJIT+C program

  • From: Peter Drahoš <drahosp@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 30 Oct 2012 12:09:34 +0100

On 30 Oct, 2012, at 6:57 , steve donovan <steve.j.donovan@xxxxxxxxx> wrote:

> On Mon, Oct 29, 2012 at 6:45 PM, Mike Pall <mike-1210@xxxxxxxxxx> wrote:
>> system. And -b promises to produce a valid file for any target
>> platform on any host platform, too. Tough job.
> 
> Best solution is probably to use lhf's srlua [1], which glues a stub
> Lua executable to an embedded script.
> 
> That script can be an archive containing all its Lua dependencies,
> e.g. Mathew Wild's Squish or Jay's soar.
> 

This is exactly the approach I am using in my current work in progress build of 
static LuaDist. It also works with LuaJIT without any issues so far. I hope I 
can provide support for static builds by the end of the year out of the box, 
including building with LuaJIT.

pd

Other related posts: