[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Continuiing problems with LuaSocket-2.0b3 and Lua-5.1w5
 
- From: whisper@...
 
- Date: Sat, 23 Apr 2005 13:51:57 -0700
 
I have read the emails I was directed to and made the changes to remove 
compat-5.1.c from the build, but things are still not working!
* I removed compat-5.1.c from the build.
* Removed #include compat-5.1.h from 2 places (luasocket and mime)
* Changed luaL_module to luaL_openlib in 2 places
* Rebuilt and got warmings (luasocket) and a clean build. "release" 
build (not debug)
lsocket.dll -  64kb
lmime.dll - 48kb
I modified the default paths in lua-5.1w5/src/luaconf.h to something 
reasonable for my platform and install location.
Dirctory structure:
lua-5.1w5\bin
   lua.exe
   luac.exe
   testclnt.lua
   testsrvr.lua
lua-5.1w5\dll
   lua.dll
   lualib.dll
   lsocket.dll
   lmime.dll
Lua-5.1w5\lua\socket
   (LuaSocket *.lua files)
  
I added a statement to print package.path and package.cpath at the top 
of testsrvr.lua
Here's the result:
E:\Lua\lua-5.1w5\bin>lua testsrvr.lua
?.lua;e:\Lua\Lua5.1w5\?.lua;e:\Lua\Lua5.1w5\bin\?.lua;e:\Lua\Lua5.1w5\lib\?.lua;e:\Lua\Lua5.1w5\
lib\?\?.lua;e:\Lua\Lua5.1w5\lua\?.lua;e:\Lua\Lua5.1w5\lua\?\?.lua;e:\Lua\Lua5.1w5\lua\?\init.lua
?.dll;e:\Lua\Lua5.1w5\dll\?.dll
lua: testsrvr.lua:2: package `socket' not found
stack traceback:
       [C]: in function `require'
       testsrvr.lua:2: in main chunk
       [C]: ?
As near as I can tell, the path "e:\lua-5.1w5\lua\?\*.lua" will point to 
socket.lua and the cpath "e:\lua-5.1w5\dll\?.dll" will point to 
lsocket.dll and lmime.dll. (BTW, "lua.exe" does work using this path 
settings.)
So, what's wrong?
testsrvr.lua looks like this:
print (package.path.."\n"..package.cpath)
socket = require("socket");
host = host or "localhost";
port = port or "8383";
server = assert(socket.bind(host, port));
ack = "\n";
while 1 do
   print("server: waiting for client connection...");
   control = assert(server:accept());
   while 1 do
       command = assert(control:receive());
       assert(control:send(ack));
       (loadstring(command))();
   end
end
Hope someone can shed some light on this - I'm completely lost!
Thanks,
Dave LeBlanc
Seattle, WA USA