|
Cutting and copying DLLs from the DLLs directory to the current directory, I conclude the executable can find lua51.dll and probably most of files. However, two files cannot be opened: iuplua.dll and iupluacontrols, despite both are included in the path.
I believe is not coincidence the fact that the two DLLs are called by the instruction "require":
require('iuplua') require('iupluacontrols')Usually, the instruction "require" receives as argument the name of a Lua script, Internally, I don't know how the stack can distinguish one from another.
Without excessive hopeness, I tried to open the libraries inside the Pascal code, doing:
luaopen_iuplua(l) luaopen_iupluacontrols(l);It doesn't work of course. If I copy the two DLLs to the current directory, the program executes normly, but I would understand exactly the reason I could not leave then in the DLLs directory.
The precise error text is: Error An unhandled exception occurred at $004015A8 : EInOutError : File not open $004015A8----- Original Message ----- From: "Graham Wakefield" <wakefield@mat.ucsb.edu>
To: "Lua list" <lua@bazar2.conectiva.com.br> Sent: Friday, January 01, 2010 4:32 PM Subject: Re: Adding new paths for the access of embedded programs
On Dec 31, 2009, at 12:15 PM, Luciano de Souza wrote:lua_pcall(l, 0, 0, 0);Change this to (the equivalent in Pascal): if (lua_pcall(l, 0, 0, 0)) { printf("error: %s\n", lua_tostring(L, -1)); }(if lua_pcall triggers an error, it returns non-zero and leaves the error message at stack index -1)lua_close(l); end. ----- Original Message ----- From: "Wesley Smith" <wesley.hoke@gmail.com > To: "Lua list" <lua@bazar2.conectiva.com.br> Sent: Thursday, December 31, 2009 5:47 PM Subject: Re: Adding new paths for the access of embedded programsif you require a module and Lua can't find it then you definitely have errors. You just need to read up on the Lua documentation to figure out how to get them. How are you loading your Lua code? wes