东京暴君的正确lua版本
我需要在tokyo tyrant服务器中使用lua扩展。我已经尝试了所有从源代码构建的lua版本,每次找到llua而没有找到llua5.1,ldd ttserver说任何lua库都没有与此二进制链接,所以我从lua网站下载了二进制软件包,ldd给出了正确的输出,但脚本仍然不能正常工作,在日志中我只能找到:东京暴君的正确lua版本,lua,Lua,我需要在tokyo tyrant服务器中使用lua扩展。我已经尝试了所有从源代码构建的lua版本,每次找到llua而没有找到llua5.1,ldd ttserver说任何lua库都没有与此二进制链接,所以我从lua网站下载了二进制软件包,ldd给出了正确的输出,但脚本仍然不能正常工作,在日志中我只能找到: 错误scrextnew失败。其他一切都正常工作,只有lua扩展不会:(在代码中有两个点会产生您看到的错误消息,这两个点都是由于调用失败造成的 /* Initialize the global
错误scrextnew失败。其他一切都正常工作,只有lua扩展不会:(在代码中有两个点会产生您看到的错误消息,这两个点都是由于调用失败造成的
/* Initialize the global scripting language extension. */
void *scrextnew(void **screxts, int thnum, int thid, const char *path,
TCADB *adb, TCULOG *ulog, uint32_t sid, TCMDB *stash, TCMDB *lock,
void (*logger)(int, const char *, void *), void *logopq){
这似乎是脚本语言的加载程序,有一个路径作为第四个参数-所以我想看看一些配置,看看是否需要将dll/so放在某个地方,或者它找错了位置?我从未使用过它(但现在对它很好奇:-),所以只是一个猜测
[更新]
查看了标题-scrext.h,其中有一些参数描述-有许多参数需要config-path和sid
/* Initialize the scripting language extension.
`screxts' specifies an array of the scripting language extension objects.
`thnum' specifies the number of the native threads.
`thid' specifies the thread ID number.
`path' specifies the path of the initilizing script.
`adb' specifies the abstract database object.
`ulog' specifies the update log object.
`sid' specifies the server ID.
`stash' specifies the global stash object.
`lock' specifies the global lock object.
`logger' specifies the pointer to a function to do with a log message.
`logopq' specifies the opaque pointer for the logging function.
The return value is the scripting object or `NULL' on failure. */
void *scrextnew(void **screxts, int thnum, int thid, const char *path,
TCADB *adb, TCULOG *ulog, uint32_t sid, TCMDB *stash, TCMDB *lock,
void (*logger)(int, const char *, void *), void *logopq);
hth问题可能不在您使用的Lua版本中,而是在您使用它的方式中。请解释您是如何将两者链接起来的(命令、相关配置行、操作系统等)。