lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 10/15/07, Evan DeMond <> wrote:

>> 2) The Manual lists where the files should be installed, including:
>>    <CDIR>/socket/core.dll
>>    <CDIR>/mime/core.dll
>> But my build didn't produce these DLLs, it produced socket.dll and
>> mime.dll, and I put them into <CDIR>. Should the manual be corrected?
> I was also wondering about this. Haven't been able to find
> any explanation on the websites for how to install on
> Win32 - are these intended to replace mime/core.dll and
> socket/core.dll?

Yes. Copy mime.dll into mime/core.dll and socket.dll into
socket/core.dll.  You can't just dump these in CDIR. It will
not work as expected. If you do that, require"socket" will
load the socket.dll and require"mime" will load mime.dll,
and they should load the higher level socket.lua and
mime.lua. You will be missing high-level functionality.


Sorry, I'm afraid I still don't understand - I've tried it with quite a few different arrangements and I still can't get it to load version 2.0.2. Here's my setup:

* Using the LuaBinaries distribution of Lua 5.1.2
* All other LuaSocket files placed as in "Directory structure" on

C:\Lua\ as LDIR
C:\Lua\lib\ as CDIR

If I understood you correctly, you said to replace core.dll in <CDIR>/mime/ with mime.dll and core.dll in <CDIR>/socket/ with socket.dll. For me this yields:

> sock = require("socket")
C:\Lua\socket.lua:13: module 'socket.core' not found:
        no field package.preload ['socket.core']
        no file 'C:\Lua\socket\core.lua'
        no file 'socket\core.lua'
        no file 'C:\Lua\lib\socket\core.dll'
        no file 'socket\core.dll'
        no file 'C:\Lua\lib\socket.dll'
        no file 'socket.dll'

If you can shed some light on what I'm doing wrong, I would appreciate it!



In addition, I tried renaming mime.dll in <CDIR>/mime/ to core.dll and socket.dll in <CDIR>/socket to core.dll, this yields:

> sock = require("socket")
error loading module ' socket.core' from file 'C:\Lua\lib\socket\core.dll':
        system error 14001