Lua 5.2 adding luasocket (unstable)

笑着哭i 提交于 2019-12-02 04:41:12

问题


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


回答1:


Is your executable residing in the same directory as your lua files? Try putting the dll in the directory of your executable.




回答2:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!