Im trying to use luasocket with lua 5.2. i downloaded the code form the git repository and built it. then made a make install so that it generated core.dll and mime.dll. put those into the custom lua program directory [CPATH] im developing and tried loading it. But i get following error message:
Failed at error loading module 'socket.core' from file 'D:\[..myprogram..]\socket\core.dll':
Module was not found.
how can i check if the dll is correct. or did i do anything wrong?
Thanks
Is your executable residing in the same directory as your lua files? Try putting the dll in the directory of your executable.
Most likely you are loading socket modules that are compiled for Lua 5.1, not Lua 5.2 (or at least it's the same error I get in a case like that). Is it possible that you have socket module for Lua 5.1 somewhere in your path? It may come with LuaForWindows or another package. You can try to remove/move the socket DLLs you compiled (for Lua 5.2) and see if you get the same error.
来源:https://stackoverflow.com/questions/17041935/lua-5-2-adding-luasocket-unstable