[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Using Lua in dynamic modules with static linking
- From: Chris Smith <space.dandy@...>
- Date: Tue, 26 Feb 2019 12:42:02 +0000
I have read all that I can find on building and linking Lua libraries, but I’m still a bit unsure if what I want to do will work. I’d appreciate it if someone can clarify things for me. Here is my situation:
1. I have an application that uses Lua.
2. The application needs to dynamically load extension modules (note these are _not_ Lua extension modules, but for the application itself).
3. The extension module also uses Lua for its own purposes.
4. The use of Lua in the application and module is completely isolated — no sharing of any sort.
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.
Chris Smith <firstname.lastname@example.org>