lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks Geoff

I'm sorry, but I couldn't figure it out in the end. Here's what I've done so far

compiled lua as dll: (set #define LUA_BUILD_AS_DLL), "import library" set to lua52.lib

compiled luasocket with lua52.dll and lua52.lib

now lua interpreter asks for lua52.dll when I type "local socket = require("socket.core")"

when I put lua52.dll near the exe, I receive the same multiple lua vms detected error.

I guess I'm doing something blatantly wrong here but couldn't figure it out.




This is a popular mistake to make.  You've probably linked luasocket to the static lua library, not the dll/lua import library.  Have a look at

http://lua-users.org/lists/lua-l/2013-05/msg00069.html
http://stackoverflow.com/questions/14213559/lua5-2s-error-multiple-lua-vms-detected

and the section "Windows DLLs with MSVC" on http://lua-users.org/wiki/BuildingModules