lua-users home
lua-l archive

Re: lua system interaction on win

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


David Burgess wrote:
On VC6, Lua 4.0.1
from the project menu
Goto - "Project/Settings"
Tab - "C/C++"
Select "All configurations"
Edit field - "Preprocessor definitions"
and paste at the end of the existing string
(which should already have something like "WIN32,_CONSOLE,_MBCS")
POPEN,popen=_popen,pclose=_pclose
Hecck, this is cool!
all problems solved w/o changing the code.
For the record:
standard Lua compiled with MSVC++6 on Windows can absolutely do pipes.
Lua 4.0 Copyright (C) 1994-2000 TeCGraf, PUC-Rio
> readfrom("|dir")
> o=read("*a")
> print(o)
 Volume in drive D has no label.
 Volume Serial Number is 085E-9F45
 Directory of D:\_ins\lua\src\lua\bin
21.08.2002 08:59 <DIR> .
21.08.2002 08:59 <DIR> ..
21.08.2002 08:59 198.972 LibLua.lib
21.08.2002 08:59 125.462 LibLuaLib.lib
29.11.2001 12:39 80.384 Lua+Lib.dll
29.11.2001 12:39 11.708 Lua+Lib.exp
29.11.2001 12:39 18.726 Lua+Lib.lib
29.11.2001 12:39 53.760 Lua.dll
21.08.2002 08:59 93.696 Lua.exe
29.11.2001 12:39 8.740 Lua.exp
29.11.2001 12:39 14.000 Lua.lib
29.11.2001 12:39 38.400 LuaC.exe
29.11.2001 12:39 33.792 LuaLib.dll
29.11.2001 12:39 3.479 LuaLib.exp
29.11.2001 12:39 6.128 LuaLib.lib
29.11.2001 12:39 52.218 luaSocket.lib
29.11.2001 12:39 12.498 lxp.lib
 15 File(s) 751.963 bytes
 2 Dir(s) 6.027.014.144 bytes free
>
Thanks so very much for such a simple solution!
-Martin

AltStyle によって変換されたページ (->オリジナル) /