lua-users home
lua-l archive

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


Greeitngs.  I hope this is the appropriate forum...
Judging from http://thelinx.github.io/lao/
ao is just exactly what I need :-)
so I tried  luarocks install ao  and got
 ao> lua ao_example.lua
lua: error loading module 'ao' from file '/usr/local/lib/lua/5.2/ao.so':
    /usr/local/lib/lua/5.2/ao.so: undefined symbol: luaL_register

so presumably it needs something like what I normally use:
 #if LUA_VERSION_NUM >= 502
    luaL_setfuncs(L, prv, 0);    /* 5.2 */
    return 0;
 #else
    luaL_register(L, NULL, prv); /* 5.1 */
    return 0;
 #endif

so I did
 git clone https://github.com/thelinx/lao
and in src/lao.c I tried to replace the
 luaL_register(L, "ao", ao);
line, but couldn't get it compiled because the way lao.c returns the
module is different ... it's probably elementary ...

It's a shame that such a neat little module isn't maintained any more.
I could probably coerce it into my usual way of doing things,
but I'm a bit old to take on more modules. And I'm not sure
that anyone's listening for pull requests on thelinx/lao

Suggestions gratefully received...

Regards,  Peter Billam

http://www.pjb.com.au     pjb@pjb.com.au     (03) 6278 9410
"Follow the charge, not the particle."  --  Richard Feynman
 from The Theory of Positrons, Physical Review, 1949