Im using Lua with C++ in a project in Visual Studio 2015. I have used Luarocks to create socket/core.dll and mime/core.dll. I have added the core.dll to the debug folder where my C++ program executes. The error I get in lua is generated when "require("socket")" executes. The following error is what I get:
...s\Visual Studio 2015\Projects\RaceGame3\Debug\Client.lua:17: module
'socket' not found:
no field package.preload['socket']
no file 'C:\Users\Username\Documents\Visual Studio
2015\Projects\RaceGame3\Debug\lua\socket.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\lua\socket\init.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\socket.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\socket\init.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\..\share\lua\5.3\socket.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\..\share\lua\5.3\socket\init.lua'
no file '.\socket.lua'
no file '.\socket\init.lua'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\socket.dll'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\..\lib\lua\5.3\socket.dll'
no file 'C:\Users\Username\Documents\Visual Studio 2015\Projects\RaceGame3\Debug\loadall.dll'
no file '.\socket.dll'
So to sum up: How do I correctly link the core.dll or other luasocket files to my current Lua instance while running the C++ project?