Re: luajit + dependencies in a single executable

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 2 Nov 2014 08:52:11 -0800

> "You may link LuaJIT statically on Windows only if you don't intend
to load Lua/C modules at runtime."
> That might give me some trouble.

I think this is a warning to avoid compiling Lua modules against Lua
DLL when you also compile Lua statically (loading two VMs into the
same process, which is likely lead to a crash). In other words, if you
want to load luasocket DLL when you compiled LuaJIT statically on
Windows, you either need to include luasocket statically as well or to
compile luasocket against lua51.dll and include a proxy dll instead of
lua51.dll that will forward calls to the appropriate functions in the
executable ([1] and related thread).

Another option as Shmuel suggested is to compile modules statically,
but the interpreter itself as a DLL (but that may not work for you if
you want one executable).

Paul.

[1] http://lua-users.org/lists/lua-l/2013-11/msg00831.html

Other related posts: