lua-users home
lua-l archive

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


On Mon, Apr 18, 2016 at 10:22 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Apr 18, 2016 at 6:32 PM, Viacheslav Usov <via.usov@gmail.com> wrote:
>>> With mingw -Wl,-E makes this happen as well.
>>
>> Is that something that you know (rather than just think) will work?
>
> Of course, you _do_ have to rebuild all your DLLs to refer to the
> symbols from the executable; that's indeed the big difference.  I know
> this works, because if an application like SciTE which embeds Lua is
> allowed to export its symbols, it can load modules, recompiled against
> SciTE.exe.
>
> The other approach is to build a fat executable with modules
> statically compiled, like I do with the luabuild project.
>
> steve d.
>

A little bit of extra detail: .exe and .dll files on Windows are the
same format. You can link to an .exe just like you can a .dll, and you
can execute a .dll that exposes an entry point just like you an an
.exe (and in fact the OS does this in many places).

/s/ Adam