[tlbuild] Lua extension modules on Windows

Philipp Stephani st_philipp at yahoo.de
Wed Apr 27 10:39:09 CEST 2011


Am 27.04.2011 um 07:53 schrieb Taco Hoekwater:

> On 04/27/2011 12:18 AM, Philipp Stephani wrote:
>> Hello,
>> 
>> I'm deeply sorry, but the neverending story continues ... this time on Windows. There the Lua interpreter is contained in the library LUATEX.DLL, but that library doesn't export the Lua runtime functions that are needed for linking against the library. The TeX Live 2010 version exports only the function "dllluatexmain", and the TLcontrib version additionally exports several PNG-related function. But to use extension modules on Windows, all Lua functions should be exported as well. Would that be possible? Even better, could TeX Live provide a stock LUA51.DLL so that extension modules could link against that library instead?
> 
> On windows, you can use the system lua51.dll without too much problems.

I tried to do this before, but made a mistake (lua51.dll has to go into SysWOW64, not System32), now my extension module almost works, but texlua.exe crashes while quitting (protection fault in module luatex.dll: writing on address 0x00000008). I've seen similar errors on OS X when I tried linking against the Lua library because the Lua functions were then defined twice; it seems that Lua doesn't like that.


More information about the tlbuild mailing list