something went wrong in snprintf that it skips the first character of the library name. Not only that, the signature is actually luaopen and not lua_open.