views:

257

answers:

1

I am using Lua inside C# WinForms application for GUI automation testing. I want to use the logging library http://www.keplerproject.org/lualogging/

But I don't know where to copy those logging library files and other standard lua files so that I can use the standard lua logging within the lua scripts.

I see something like LUA_PATH but still I don't understand how to make the lua packing strcuture without installing it.

+1  A: 

Did you tried to use LuaRocks (http://www.luarocks.org/). Most libraries (including lualogging) are in the repositories, and the install is straightforward : luarocks install lualogging.

About the environment variables, you have to define two : LUA_PATH and LUA_CPATH. If i'm correct, LUA_PATH is for the Lua libraries (i.e. mylib.lua), and LUA_CPATH is for the compiled binding to a native library (e.g. lsqlite3.so for the Sqlite binding).

Hope this helps.

jideel
Does LUA_PATH supports multiple directories for example, in windows I should be able to mention LUA_PATH=C:\LUA51;C:\MyApp\Lua\Scripts;C:\Myapp\Lua\Lib;Looks like LuaInterface has got issues with loading lua libraries when they reside outside path. Something needs to be hooked there
Gopalakrishnan Subramani
My environment variables are set this way :LUA_PATH=/Users/jideel/.luarocks/share/lua/5.1/?.lua;?.luaLUA_CPATH=/Users/jideel/.luarocks/lib/lua/5.1/?.so;?.soSo multiple paths separated by a ; seems to be supported, although i'didn't tried with Windows.
jideel
;?.lua is meant to search lua files in the directory from wich the app has started.
jideel
the ?.lua or ?.so, ?.dylib, ?.dll is mandatory. You can't just specify the path alone.
jideel