lua-users home
lua-l archive

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


On 19/05/2010, at 6:51 AM, Luiz Henrique de Figueiredo wrote:

> Lua 5.2.0 (work3) is now available at
> 	http://www.lua.org/work/lua-5.2.0-work3.tar.gz

What's going on with luaL_register?  I thought that luaL_openlib was deprecated and that we should use luaL_register instead, but in work3's luaxlib.h there's:

#define luaL_register(L,n,l)	(luaL_openlib(L,(n),(l),0))

This means that luaL_register isn't visible to the dynamic linker (and luaL_openlib is).  Which in turn causes:

$ ~/lua-5.2.0-work3/src/lua rima-test.lua 
.../lua-5.2.0-work3/src/lua: error loading module 'lfs' from file '/opt/local/lib/lua/5.1/lfs.so':
	dlopen(/opt/local/lib/lua/5.1/lfs.so, 2): Symbol not found: _luaL_register
  Referenced from: /opt/local/lib/lua/5.1/lfs.so
  Expected in: flat namespace
 in /opt/local/lib/lua/5.1/lfs.so

I looked through the archives, and it seems like Steve Donovan had exactly the opposite problem with work1.  I'm confused.  Can anyone spot my obvious mistake?

Cheers,
Geoff