[Dev-luatex] Building Lua as a DLL (reference manual page 32)
graham.douglas at readytext.co.uk
Wed Dec 17 12:42:05 CET 2014
During one of my periodic re-reads of the LuaTeX Reference Manual (for
beta 0.79.2) I was interested to read the following on page 32:
"NOTE: Also in LuaTEX 0.74.0 (this is a change in Lua 5.2), loading
dynamic Lua libraries will fail if
there are two Lua libraries loaded at the same time (which will
typically happen on Win32, because
there is one Lua 5.2 inside luatex, and another will likely be linked to
the dll file of the module itself).
We plan to fix that later by switching LuaTEX itself to using the DLL
version of Lua 5.2 inside LuaTEX
instead of including a static version in the binary."
I use LuaTeX on Windows exclusively and have certainly encountered the
"multiple Lua VMs" issue with Lua 5.2.x when trying to use LuaTeX
plug-in DLLs I've written via Visual Studio. I build the latest LuaTeX
versions via MinGW but also have a private port of LuaTeX to a native
Windows build (that port is now very old --- beta-0.77.0-0 (rev 4641)).
In that private port of LuaTeX I build Lua as a DLL so I can use my
plug-ins but, as mentioned, my port is now really old and I'd like to
use the latest versions of LuaTeX (built by MinGW).
So, I was wondering if building Lua as a DLL during the MinGW build
process is something that is planned for the near future?
I must state that I'm not a professional or expert developer (just a
hobbyist!!) so the following discussion on Stackoverflow (problems with
using MinGW DLLs in Visual Studio due to C++ name-mangling) was
definitely of interest to me:
As always, thanks to everyone involved in the LuaTeX team for providing
such an amazing TeX engine.
With all best wishes
More information about the dev-luatex