alknows
alknows

Reputation: 2044

Lua 5.2 adding luasocket (unstable)

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

Upvotes: 2

Views: 1701

Answers (2)

Paul Kulchenko
Paul Kulchenko

Reputation: 26744

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.

Upvotes: 1

Enigma
Enigma

Reputation: 1717

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

Upvotes: 1

Related Questions