lua-users home
lua-l archive

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


> > Making shared libs the standard for lua-addons would make lua both
> > platform dependent and sysadmin dependent.
> 
> This however is a problem. A better way of easily adding libs to a
> standard build (preferably without having to edit any source) 
> would be a
> big win. Even something as low-tech as a file containing calls to init
> functions that was then #included into lua.c.

What if any module distribution contains a static and dynamic library for
linking either way? 

And how about the same script which you "require" to load a dynamic module
also contains information to add a call to the init library function and
include a header between some predetermined comments or macros. 

eg.

lib_foo wrapper inserts: libfooopen(L);

/* LUA_LIBS_BEGIN */
libfooopen(L);
/* LUA_LIBS_END */

You could run this script as part of your makefile and it could also check
and add dependencies? Is this overly complex?

Nick