[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LuaInterface and Lua 5.1.1
- From: Ryan Raaum <ryan@...>
- Date: Wed, 23 Aug 2006 10:23:19 -0400
I'm trying to use LuaInferface with Lua 5.1.1 and I've run into a roadblock.
I tried using the binaries included with LuaInterface 1.3.0, but ran
into a BadImageFormatException that I couldn't resolve. I decided that
there was a good chance that I was running into either: (1) a .Net
incompatibility of some sort with the LuaInterface dll and my system or
(2) an architecture incompatibility - I'm on x64, which causes me all
sorts of problems.
So I decided to build LuaInterface myself and make it work with my
current Lua 5.1.1 setup. I've built lua 5.1.1 using VC++ Express and
everything seems to be fine, I've compiled several C and C++ external
libraries and everything seems to playing together nicely. Everything is
built targeted for x86, so I'm hoping that should have eliminated any
problems I was having due to architecture.
Now, I get yet another BadImageFormatException when I try to create a
new Lua() instance. Basically, the C# program is (using VC# Express,
1 using System;
2 using LuaInterface;
4 namespace LuaCon
6 class Program
8 private bool bRunning = true;
9 public static Lua pLuaVM = null;
11 public Program()
13 pLuaVM = new Lua();
16 static void Main(string args)
18 Program pPrg = new Program();
and it chokes on line 13, the Lua() invocation. At first it choked
because LuaDLL.cs and Lua.cs in LuaInterface use lua_open which is only
a definition in 5.1.1, but I replaced it with luaL_newstate and things
got no better.
Anyone have any experience? ideas?
Thanks very much,