lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
/usr/local/bin/lua -lalarm test.lua
./
/usr/local/bin/lua: ./alarm.lua:8: attempt to call global 'loadlib' (a nil value)

Just remove alarm.lua and install alarm.so somewhere that require finds it.

Thanks Luiz.

I copied it to /usr/local/lib/lua/5.1.
Which is where I found the expat lxp.so  library which is working great.

Require finds it but I get this error.

jimmie@squirrel:~/lua$ lua
Lua 5.1.1  Copyright (C) 1994-2006 Lua.org, PUC-Rio
> require 'lalarm'
error loading module 'lalarm' from file '/usr/local/lib/lua/5.1/lalarm.so':
        /usr/local/lib/lua/5.1/lalarm.so: undefined symbol: luaopen_lalarm
stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?

Am I doing something wrong?

Any help greatly appreciated.

Thanks.

Jimmie