From: David Heiko Kolf <david@dkolf.de>
To: Lua mailing list <lua-l@lists.lua.org>
Sent: Friday, June 14, 2013 6:58 PM
Subject: Re: lua 5.2.2 - lua socket 2.1 module load crash
Carl Yogehnburg wrote:
> 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.
I've mainly worked with MinGW when compiling Lua applications on
windows, so I don't know the exact options for MSVC.
On Windows you need to make sure that both the application that opens
the Lua state and the library are using the same Lua-DLL. The advice
for Unix systems to include Lua statically in your application does not
work for Windows.
If both your application as well as the library are using the same DLL
and none include the Lua functions themselves, it should work.
Best regards,
David
Kolf