> Some principles as far as I understand them<p>(on LUA_PATH/LUA_CPATH/PATH)<p>If it's a .lua file, it goes in LUA_PATH. Lua libraries with collections of files usually have a main file and a folder, so libXXX might have a main file XXX.lua and a folder XXX with auxiliary files. In this case, the main file and folder go into the same directory on the LUA_PATH.<p>.dll (linux: .so) files that are lua module entry points, i.e. they are loaded by the lua executable itself when you do a "require", go in LUA_CPATH.<p>You can see why by typing require"XXX" into the lua console - it'll say that XXX was not found and print out a list of LUA_(C)PATH entries that it searched for - note that .dll and .lua ones are looked for in different directories. So require"lib" will find a lib.lua on the LUA_PATH or a lib.dll (lib.so) on the LUA_CPATH.<p>If it's a dll that's not loaded through a require, but from one dll to another - like the lua ssl library loads the openSSL ones (libssl32.dll) - then it goes wherever the operating system looks for libraries, since it's the OS and not lua that'll be doing the looking. On windows the PATH is a good place to start, on linux I usually set LD_LIBRARY_PATH to pick up ones in non-standard locations.
For anyone not familiar with Lua, this guide includes instructions for adding on several bonus packages beyond the base Lua interpreter.<p>To just get Lua itself up and running, given a C compiler, the only step that's necessary is 3.
It's sad how "compile something <i>on Windows</i>" is something deserving elaborate how-tos. How hard can it be to provide a sane development environment?