lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Apr 18, 2016 at 4:48 PM, steve donovan <> wrote:
On Mon, Apr 18, 2016 at 4:44 PM, Viacheslav Usov <> wrote:
> And for Windows?

Sure, Windows executables can export symbols like DLLs can.

Well, yes, but there is an important difference with Unix shared libraries. In Windows, an executables that wants to import function foo, has to specify that it is contained in DLL bar. In Unix, those two things are independent (which is how one can redirect/override imports in Unix) .

So if my Lua module was built with Lua 5.2 for Windows, it will have an import blob that says "load lua52.dll, find lua_verison, lua_tonumber, etc in its export section and use them". Having those same functions exported from my host.exe is useless, because the loader won't even look there.

With mingw -Wl,-E makes this happen as well.

Is that something that you know (rather than just think) will work?