LuaInterface出现错误,无法加载模块(在Lua for Windows中可以正常运行)。

在DoFile中进行Lua编译和执行时,

Lua luaVM = new Lua();
luaVM.DoFile("test.lua");

我得到了以下错误信息。

An unhandled exception of type 'LuaInterface.LuaException' occurred in LuaInterface.dll
Additional information: error loading module 'mytestlib' from file '.\mytestlib.dll':
    %1 is not a valid Win32 application.

这个dll是我自己编写的,当我从LFW(Windows的Lua)中调用这个Lua时,它可以工作。我需要像环境变量这样的东西吗?(我将lua/5.1文件夹添加到EV中)

点赞