qlua / luainterface

Automatically exported from code.google.com/p/luainterface
0 stars 0 forks source link

can not require external module from luainterface, like lfs, libcurl #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a vs2010 project, reference luainterface
2. csharp code like 
   Lua lua = new Lua();
   lua.DoFile("test.lua");
3. in test.lua file:
   requrie 'lfs'
   print(lfs._VERSION)

What is the expected output? What do you see instead?
should output: LuaFileSystem 1.4.2
instead: throw LuaException, message is 'function'

What version of the product are you using? On what operating system?
interface 2.0.3, vs2010, windows7

Please provide any additional information below.
in the test.lua file, you can require luanet module and lua's internal module 
like os, io OR other modules writen in plan text, BUT can not require
other DLL file module.

Original issue reported on code.google.com by perl...@gmail.com on 6 Jan 2011 at 3:26

GoogleCodeExporter commented 9 years ago
luanet.load_assembly("NAME")

Original comment by thepie...@gmail.com on 8 Jan 2011 at 4:25

GoogleCodeExporter commented 9 years ago
thank you for replay, thepiepod.
but I want to use the lua's library like lfs, md5, NOT the .net library.

Maybe the luainterface not a true lua compiler that don't recognise lua's C 
library.

Original comment by perl...@gmail.com on 9 Jan 2011 at 1:05

GoogleCodeExporter commented 9 years ago
LuaInterface isn't a compiler at all, and neither is Lua.  It's an interpreted 
language (barring LuaJIT, of course).  Anyway, besides mincing words, it is Lua 
to the byte.  Copy the source for Lua 5.1.4 over the LuaDLL 5.1.2 source 
included with LuaInterface and build it.  Voila!  You have LuaDLL 5.1.4 instead 
of 5.1.2.  It's exactly the same code.

I've had similar problems trying to import .NET namespaces (SlimDX being the 
primary example):  if it's not in the GAC, it just won't do it.  I've yet to 
discover a workaround.  This is why I've moved to IronPython even though I much 
prefer Lua.

Original comment by thatfiel...@gmail.com on 12 Jan 2011 at 7:31

GoogleCodeExporter commented 9 years ago
See issue LuaForWindows issue 35 
<http://code.google.com/p/luaforwindows/issues/detail?id=35&can=1> for a 
version of LuaInterface 2.0.3 compatible with LuaForWindows and its C modules 
(clib DLLs).

Original comment by joerg.bl...@gmail.com on 13 Jan 2011 at 12:28

GoogleCodeExporter commented 9 years ago
if u want print something,u should create a function in C# like "myprint",and 
registe it to lua state.
In "myprint",u can output what you want to a special window ,TextBox,i.e.

Original comment by isSin...@gmail.com on 23 Mar 2011 at 3:19