seelview89 / luaforwindows

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

lua tour does not work as expected #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the lua tour
2. Go to last example
3. require("iuplua") fails because the DLL is not found

What is the expected output? What do you see instead?

I think the expected output is a demo of IUP. I'm seeing an error saying
iuplua.dll is not found on this computer.

What version of the product are you using? On what operating system?

Using the featured download on the project homepage. The OS is Windows 7
Enterprise 64 Bit on an Intel Duo P9600 2.66GHz.

Please provide any additional information below.

None.

Original issue reported on code.google.com by warriorj...@gmail.com on 1 Jun 2010 at 4:45

GoogleCodeExporter commented 8 years ago
Second time, when I run the QuickLuaTour from the start menu, it worked.

The real reason I'm interested is to try luainterface.

I'll download the patch and try it.

Original comment by warriorj...@gmail.com on 1 Jun 2010 at 4:47

GoogleCodeExporter commented 8 years ago
Have you rebooted since installing LfW? Please try that. The installer does 
change 
your environment.

Original comment by rpusz...@gmail.com on 1 Jun 2010 at 5:24

GoogleCodeExporter commented 8 years ago
Yep, rebooted, and I've also installed the patch for Win7/Vista. I tried various
require() with mixed results:

> require("luacurl")
{GOT_NOTHING=52,FTPAUTH_TLS=2,OPT_WRITEFUNCTION=20011,OPT_TIMECONDITION=33,CONTE
NTSLENGTH=6,OPT_RESUME_FROM_LARGE=30116,OPT_HTTPHEADER=10023,FTP_PORT_FAILED=30,
IPRESOLVE_V4=1,AUTH_BASIC=1,OPT_BUFFERSIZE=98,CURL_FORMADD_UNKNOWN_OPTION=4,OPT_
PROXYTYPE=101,OPT_AUTOREFERER=58,INFO_REDIRECT_COUNT=2097172,NETRC_REQUIRED=2,SS
LVERSION_TLSv1=1,SSL_CIPHER=59,IPRESOLVE_V6=2,OPT_TRANSFERTEXT=53,END=17 ... }
> require("Date")
{daynummin=function: 002B1298,isodate=function: 002B1270,epoch=function: 00287A3
8,ticks=function: 002B13D8,daynummax=function: 002B13B0,time=function: 002BC7E8,
isleapyear=function: 002B1310,version=20000000,diff=function: 002B4F88,fmt=funct
ion: 00287A58,__call=function: 00286EB0}
> require("MD5")
true
> require("LuaInterface")
error loading module 'LuaInterface' from file 'C:\Program Files (x86)\Lua\5.1\cl
ibs\LuaInterface.dll':
        The specified procedure could not be found.

> require("LuaCOM")
error loading module 'LuaCOM' from file 'C:\Program Files (x86)\Lua\5.1\clibs\Lu
aCOM.dll':
        The specified procedure could not be found.

> require("Alien")
true

The most important one for me to work is LuaInterface.

Original comment by warriorj...@gmail.com on 1 Jun 2010 at 8:49

GoogleCodeExporter commented 8 years ago
What patch are you referring to? I think you mean the LuaInterface patch right?

It also looks like you have the ability to require now. So your original issue 
is 
gone away. Correct?

Please check to make sure that you have an environment variable set named 
'LUA_DEV' 
and that it points to the root install directory of LfW.

Also what is making the tables print like that in your example? That is not 
standard 
behavior.

Original comment by rpusz...@gmail.com on 2 Jun 2010 at 3:33

GoogleCodeExporter commented 8 years ago
Yes, I can do require() -- original issue solved.

The installer set the following env vars:

LUA_DEV = c:\lfw514\
LUA_PATH = ;;c:\lfw514\lua\?.luac

I have no idea what makes the tables print like that as a result of require().

I'm going to delete absolutely everything having to do with Lua from my machine 
and
start over.

Original comment by warriorj...@gmail.com on 2 Jun 2010 at 6:26

GoogleCodeExporter commented 8 years ago
Well clearly you have an issue with your machine. The LUA_DEV and LUA_PATH are 
wrong 
for the example you are posting.

> error loading module 'LuaInterface' from file 'C:\Program Files 
(x86)\Lua\5.1\cl
ibs\LuaInterface.dll': The specified procedure could not be found.

You can see Lua wants to load modules from C:\Program Files... not C:\lfw514. 
LuaInterface is the only module I am aware of that uses LUA_DEV so it must be 
correct. I am not sure what the installer does if you reinstall/move the 
install to a 
different location on your machine. It appears that you have done that. Am I 
correct?

I would suggest:

# Uninstall
# Make sure the environment variables LUA_DEV and LUA_PATH are /deleted/.
# Reboot your computer.
# Install LfW.
# Reboot and now everything should work perfectly.

Original comment by rpusz...@gmail.com on 2 Jun 2010 at 1:27

GoogleCodeExporter commented 8 years ago
Did as you suggested, rebooted, LUA_DEV and LUA_PATH are now:

LUA_DEV    C:\Program Files (x86)\Lua\5.1
LUA_PATH   ;;C:\Program Files (x86)\Lua\5.1\lua\?.luac

I'm still getting:

C:\Program Files (x86)\Lua\5.1>lua.exe -lilua
ILUA: Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
"quit" to end
> require("iuplua")
{K_mI=841,CLOSE=-3,K_cMinus=557,TreeSetNodeAttributes=function: 0058AD60,K_cR=59
4,GetChildPos=function: 0054D2A8,K_yF11=1177,K_mJ=842,K_O=79,K_n=110,BUTTON4=52,
LEFT=65534,K_o=111,K_c0=560,K_yF10=1176,K_F2=144,K_l=108,GetBrother=function: 00
54D2E8,_ERRORMESSAGE=function: 005507A8,K_m1=817,K_d=100 ... }
> require("LuaInterface")
error loading module 'LuaInterface' from file 'C:\Program Files (x86)\Lua\5.1\cl
ibs\LuaInterface.dll':
        The specified procedure could not be found.

>

Original comment by warriorj...@gmail.com on 2 Jun 2010 at 6:06

GoogleCodeExporter commented 8 years ago
Did you remember to apply the patch to LuaInterface?

Also please stop using the iLua. Right now I just want you to run lua.exe from 
the 
Command prompt. I am not sure what it does so I want to stop using it, just for 
this.

Original comment by rpusz...@gmail.com on 2 Jun 2010 at 7:53

GoogleCodeExporter commented 8 years ago
Yes, I applied the patch and rebooted again -- just for good measure, to flush 
the OS
DLL cache -- and I'm running lua.exe from c:\program files (x86)\Lua\5.1 :

C:\Program Files (x86)\Lua\5.1>lua.exe
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require("LuaInterface")
error loading module 'LuaInterface' from file 'C:\Program Files (x86)\Lua\5.1\cl
ibs\LuaInterface.dll':
        The specified procedure could not be found.

stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?

I tried with just a cmd.exe and also with a cmd.exe running as Administrator. 
Nothing
different.

Many thanks for persisting on this topic, I appreciate the help! We'll get it 
right
eventually :)

Original comment by warriorj...@gmail.com on 2 Jun 2010 at 8:26

GoogleCodeExporter commented 8 years ago
I also tried require("luanet") and that did load w/o any complaints.

Original comment by warriorj...@gmail.com on 2 Jun 2010 at 9:39

GoogleCodeExporter commented 8 years ago
Steve D.,

Can you please take it from here. I am out of ideas.

Original comment by rpusz...@gmail.com on 3 Jun 2010 at 1:29

GoogleCodeExporter commented 8 years ago
> I also tried require("luanet") and that did load w/o any complaints.

That's exactly what you need to do - LuaInterface.dll is not a Lua extension, 
it's
the managed part of the .NET interface to Lua - luanet.dll is the loader that's 
meant
to be loaded by Lua.  If this works, then you should be able to run the 
examples.

steve d.

Original comment by steve.j....@gmail.com on 3 Jun 2010 at 1:57

GoogleCodeExporter commented 8 years ago
Thanks Steve. I was now able to do the example from the LuaInterface paper of
creating a form with two buttons.

The next issue is going to be how to use LuaInterface from inside a c# program. 
I
cannot make a reference to luanet.dll because it says that's not a valid 
assembly.
Any ideas?

Original comment by warriorj...@gmail.com on 4 Jun 2010 at 4:41

GoogleCodeExporter commented 8 years ago
I think this has fixed the original issues

Original comment by rpusz...@gmail.com on 6 Jun 2011 at 1:59

GoogleCodeExporter commented 8 years ago

Original comment by rpusz...@gmail.com on 6 Jun 2011 at 2:00