lua-users home
lua-l archive

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


On Mon, Aug 6, 2012 at 11:08 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Aug 6, 2012 at 11:49 AM, Jerome Vuarand
> <jerome.vuarand@gmail.com> wrote:
>> Just to clear some common misconception, this is possible on Windows.
>> An EXE can expose symbols (other than main/WinMain), and other modules
>> (DLLs or other EXEs) can link against it.
>
> Yes, one can recompile common Lua extensions to be useable for SciTE
> scripting, for instance, by linking against the exported Lua symbols
> from SciTE.  But (as Jerome points out) such extensions are then quite
> specific to SciTE.  So in LfW we linked SciTE dynamically against
> lua5.1.dll.
>
> On Linux, extensions are more promiscuous - they'll pick up their
> symbols where they can find them ;)

Another alternative is to export the symbols from the EXE and then
create a dummy lua5.1.dll file which contains forwarded exports for
every symbol (and zero code). Compiling said DLL is slightly arcane,
but the resulting file should be very small, and there is no runtime
overhead for calls to the symbols.