I'm trying to load a dll into my lua script and call the function. When I create the dll using GCC (under cygwin) and lua (5.2.4) I'm able to load the library & execute it without a problem. However, when I create run the same script from SciTE, using Lua 5.1, the dll loads successfully. However, it does not execute. In the dll I'm trying to simply write two integers into a file.
t = package.loadlib("mylibrary.dll","myfunc")
t(23,45)
There are two questions here: 1. What format should the 'mylibrary.dll' be, for lua to understand and execute without problems - ELF or COFF. 2. Can I run dll (built under windows, obviously) under lua running on linux?