[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Standard Windows DLL: (was ANN: wxLua 5.0.2 released.)
- From: Serge Semashko <serge@...>
- Date: Tue, 02 Mar 2004 12:10:04 +0200
Virgil Smith wrote:
The question keeps coming up on this list of where to get Lua DLL binaries
for Windows, and myself and others keep pointing out that there not on the
wiki (or weren't previously), but that its just <<so easy>> to make that it
really didn't matter.
However, if library contributors are stumbling over libraries being
incompatible for this reason then I strongly suggest that someone put forth
a "standard" DLL onto the Wiki.
Does anyone know of any issues that would complicate this?
(I expect that those who have put forth open libraries would know what
issues could cause disagreements, linking problems, license statement
It would be much better to make a decision about standard lua5 ABI and
post it as a new LTN. That should explain how dlls (and .so files) are
named, which functions they export and in which order they should be
called to load a new binary module.
Something like http://lua-users.org/wiki/LuaBinaryModules but for lua5
By the way, luacheia team has some experience in making support for
different binary modules with lua, so they can make initial version of
The following example below uses luafs module from luacheia and dll from
wxlua (this example shows list of files from the current directory in
html widget as a table). It uses vanilla lua 5.0 compiled with mingw.
wxlua links with lua50dll.dll, luafs links with liblua-5.dll and
liblualib-5.dll, this is not very good and can cause problems but this
simple example works and shows that different modules can work together.
If all the modules authors used the same names for dll's and functions,
it would not require hacking makefiles and recompiling at all.
wx = loadlib("wxLuaDLL.dll", "wxLua")()
htmlTextPage = "<html><head><body><table border = 1>" ..
"<tr><td>file name<td>file size"
for k, v in fs.listdir(".") do
htmlTextPage = htmlTextPage ..
"<tr><td>" .. v .. "<td>" .. fs.fileinfo(v).size
htmlTextPage = htmlTextPage .. "</table></body></html>"
frame = wx.wxFrame(wx.wxNull, -1, "Files from the current directory",
wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE)
html = wx.wxLuaHtmlWindow(frame)
I don't use luacheia5.exe as I want to be able to use a set of other
patches (continue keyword support and support for hextradecimal constants).
I would propose to replace ".dll" extension to ".so" for lua5 binary
modules, so scripts can be used unmodified both in windows and linux.
Also, as you see, initialization of these two libraries is a bit
different now, I would like to see some convention about naming loadable
module entry point functions and a common way of additional libraries