lua-users home
lua-l archive

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

> On 26 Feb 2019, at 19:45, William Ahern <> wrote:
>> On Tue, Feb 26, 2019 at 12:42:02PM +0000, Chris Smith wrote:
>> I think the best way of doing this is to statically link both the
>> application and the module against the Lua libraries. I understand that
>> means the Lua code will be duplicated in both application and module, but
>> that is actually a good thing for me since it means the application and
>> module can have mismatched Lua libraries. Is this correct, or will I
>> encounter problems? I need this to work on OS X and Windows platforms.
> I've done this on OS X (Mach-O) and Linux (ELF). Only the extension module
> needs to be statically linked to Lua. The main application can be
> dynamically linked or even just be a stock lua binary. But there are two
> caveats as static linking and static compiling are ambiguous phrases on
> modern systems--the details matter.

If I understand correctly, the two caveats you detail only apply because the main application is dynamically linked to the Lua library? If I statically linked both application and module to their respective Lua libraries then I wouldn’t expect any issues, correct?