在我的 C# 应用程序中嵌入 lua:需要“luainterface”失败
我从他们的网站下载了最新版本的 LuaInterface,并引用了 LuaInterface.dll 和 Lua51.dll。解释器本身工作正常,但是当我尝试 require("luainterface") 时,我得到了这个异常:
error loading module 'luainterface' from file '.\luainterface.dll':
The specified procedure could not be found.
这是产生此行为的示例代码:
static void Main(string[] args)
{
Lua lua = new Lua();
lua.DoFile("test.lua");
}
test.lua 脚本只有这样:
luanet = require("luainterface");
另外,我已经确保 LUA_PATH指向 luanet.dll 所在的位置。
可能是什么问题?
I downloaded the newest version of LuaInterface from their site, and referenced LuaInterface.dll and Lua51.dll. The interpreter itself works fine, but when I try to require("luainterface"), I get this exception :
error loading module 'luainterface' from file '.\luainterface.dll':
The specified procedure could not be found.
Here's the example code which produces this behavior :
static void Main(string[] args)
{
Lua lua = new Lua();
lua.DoFile("test.lua");
}
The test.lua script just has this :
luanet = require("luainterface");
Also, I've made sure that LUA_PATH points to where luanet.dll is.
What could be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论如何,都会在 LUA_CPATH 中查找 .dll...
http://www.lua.org/manual/5.1/manual .html#pdf-package.cpath
For .dll's are looked for in LUA_CPATH in any case...
http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath