lua-users home
lua-l archive

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


On Sun, Apr 4, 2010 at 6:44 AM, Brent Pedersen <bpederse@gmail.com> wrote:
> my luaopen looks like this:
>
>    // in lext.c
>    int luaopen_lext(lua_State *L){
>         luaL_openlib(L, "lext", lext, 0);
>         return 1;
>   }

You should be able to directly say require 'lext', if lext.so is
sitting on your Lua cpath (the value of package.cpath - print it out
to find where lext.so needs to be).  The convention for the exported
function name is luaopen_NAME if the module is NAME.so (or NAME.dll on
Windows).

steve d.