How do I install lua.dll so that lua.exe doesn't ask for it in every directory?

Every time I enter the lua my_script.lua

command prompt, it asks me for lua53.dll in the same folder. How can I set the path so that I don't have to have a copy of the lua library in every folder that I want to run the .lua file? I wonder if this is done via options or if I should create my own .exe from .c files using environment variables, but I really don't know.

I downloaded the binaries from http://luabinaries.sourceforge.net (v5.3.2 - May 19) and put the lua.exe inside C: / Windows / System32.

+3


source to share


1 answer


According to this MSDN article , the directory from which the application is loaded is the first location that is checked for the DLL file. If you placed a DLL near the location lua.exe

it encountered, the DLL should be found and loaded by the system.



It may be best not to put application files in your system folders. Just create a separate folder and put your Lua files (.exe and .dll) there. Then you can add this folder to your PATH environment variable so that it can be found when you run it as lua

.

+4


source







All Articles