lua-users home
lua-l archive

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


> could someone please make it easier to open an arbitrarily large set
> of libraries right after luaL_openlibs(L)

Perhaps I'm missing something but the usual solution for that is to copy
linit.c and edit it at will: linit.c is meant to be modified and it's a
simple matter of adding or deleting enties in the lualibs list.

> would like to be able to link statically against my own libraries
> without having to edit *any* of the C code distributed with Lua. I
> just want to link against my main.o instead of the official main.o,
> and I want both to be as small as possible.

Like I said, our approach is that people do want to reuse lua.o (the
main module in the standalone interpreter), because it is a rather
complicated piece of code to mess with. But since users want to control
what libraries are statically linked, we have provided linit.c as a
separate module that users can replace wih their own version without
rebuilding Lua: just provide their own version of luaL_openlibs and let
the linker use that instead of the one in the Lua library.

--lhf