lua-users home
lua-l archive

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


	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