lua-users home
lua-l archive

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


> - How would I build a statically-linked Lua interpreter binary?

That's what the standard Makefile does. If you mean *completely* static,
ie, containing all systems libraries, then add -static to the link flags.

> - How could I build a library (in this case, luaposix) into the 
> interpreter such that it could be required without loading the extra .so?

Edit linit.c and add the library in Makefile.

> - Would it still be possible to load shared libraries from such an 
> executable, or would I have to build everything into it?

You need to link the interpreter using -Wl,-E (or equivalent magic)
to export the Lua API symbols.