lua-users home
lua-l archive

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


> Can you describe a simple test for dynamic library support?

Save this file to dummy.c:

/* dummy.c -- a minimal Lua library for testing dynamic loading */

#include <stdio.h>
#include "lua.h"

int luaopen_dummy (lua_State *L) {
 puts("Hello from dummy");
 lua_pushnil(L);
 puts("Bye from dummy");
 return 0;
}

Then do
	cc -o dummy.so -shared -fPIC dummy.c
	lua -ldummy

> If readline supports the interactive interpreter then yes, readline
> support was active. Otherwise, please let me know how to check.

I'm suprised that readline is active in the interactive interpreter without
defining LUA_USE_READLINE when building Lua.