Lua 5.1 dll 错误:第 1 行需要等号?

Net*_*ite 2 dll multilingual lua cross-language lua-5.1

我有以下代码:

int luaopen_Library()
{
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

尝试调用require "Library"会引发以下错误:

Library.dll:1: '=' expected
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?如果需要更多信息,请告诉我;我是使用 dll 的新手。

lhf*_*lhf 5

该消息告诉您 Lua 正在尝试将 dll 作为 Lua 程序加载。您可能已将 dll 放在LUA_PATH. 您需要将其移动到由 给出的路径LUA_CPATH