lua-users home
lua-l archive

Re: Problem using lalarm with 5.1

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


Tomas wrote:
 Hi Jimmie
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?
 Did you renamed the file? It seems it was called `alarm.so',
so it must have a function called `luaopen_alarm'. `require' guess the
name of the function by the name of the file so you must not rename it.
 Hope this helps,
 Tomas
Hello Tomas,
No I did not rename the file. However, when doing the 'make' it attempts to run the alarm.lua file. Which I suppose is generally expected and it calls the lalarm.so. So according to what you wrote I renamed the lalarm.so (its original name) to alarm.so. Now it works.
So, yes you did help. :)
Thanks.
Jimmie

AltStyle によって変換されたページ (->オリジナル) /