It is currently 1:44 AM. When I started trying to create a simple C# project that implemented Lua it was 10:30. In this time period I have read tutorials, articles, and experimented, but I don't even have a hello world program to show for all of my efforts.
I have downloaded the LuaInterface1.3 (I know, an old version but that is what the main tutorial i was reading was using) and saved it at this path: C:\LuaInterface\luainterface-1.3.0.
I have MSVC# 2008 Express Edition.
Here is what I have done:
- I created a console project and called it LuaTest.
- The first thing I did was add a reference to LuaInterface.dll.
- I added luanet.dll, LuaInterface.dll and lua50.dll to the debug folder of the LuaTest project
- Then in the autogenerated file Program.cs I added the using statement, "using LuaInterface;".
- I wrote some code in main which gives me this:
When I try to compile this I get the following error: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) and the lineCode:using System; using System.Collections.Generic; using System.Linq; using System.Text; using LuaInterface; namespace LuaTest { class Program { static void Main(string[] args) { Lua lua = new Lua(); lua["num"] = 2; lua["str"] = "a string"; double num = (double)lua["num"]; string str = (string)lua["str"]; Console.WriteLine("str:" + str + "\tnum:" + num); Console.ReadLine(); } } }is highlighted.Code:Lua lua = new Lua();
I am frustrated and tired, I really want to use lua. Please help me! What is wrong, what do I need to do?


LinkBack URL
About LinkBacks






Reply With Quote