currently any C library have to be explicit linked to corresponding
lua dll such as lua52.dll, lua53.dll etc
so once compiled C lib is depended from some version of lua core lib
and may not compatible with current lua environment
for example user ivnoke 5.3 based lua interpreter and via "require"
load 5.2 based C library
solution for solve this problem is passing to luaopen_* function
struct with pointer to lua api functions instead explicit linkage to
lua*.dll
// new struct in lua.h
struct LuaAPI
{
int version;
void (*pushcfunction)(lua_State *L, lua_CFunction f);
int (*lua_gettop (lua_State *L);
// and other
};