0

While I DoFile:

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

This is the error I got.

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.

The dll is I made, It works when I call this lua from LFW(lua for Windows). Do I need something like a environment variables? (I added the lua/5.1 folder to EV)

greatwolf
  • 20,287
  • 13
  • 71
  • 105
Peng Zup
  • 1
  • 4
  • Hi Peng Zup, have you tried use NLua instead, IIRC the latest version of LuaInterface will not load native .dlls as modules. – Vinicius Jarina Dec 11 '14 at 17:51
  • yes, but the lua52.dll in the package seemed not work. – Peng Zup Dec 12 '14 at 02:57
  • It looks like you might need to change your project from `Any CPU` to something like `x86` to run as a 32 bit dll (since lua is likely compiled as a 32 bit dll as well). – SwDevMan81 Feb 11 '15 at 22:37

0 Answers0