lua-users home
lua-l archive

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


> This reminds me of something that I have been thinking of for a while:
> 
> 1. Have an executable built with Lua statically.
> 
> 2. Load native Lua modules built for the same Lua version, that would then
> use the static Lua library in the host executable.

This is exactly what the command line interpreter lua does.

> It is acceptable that both Lua and modules need to be built with a special
> define or defines.

For Linux, you need to use -Wl,-E when linking so that symbols in the
executable are seen for dynamic linking.

For Mac OS X, no magic is needed.