I have this simple program which i make into dll in Visual C++ 2008 Express:
#include <lua52/lua.h>
#include <lua52/lualib.h>
#include <lua52/lauxlib.h>
#pragma comment(lib,"lua52.lib")
#include <stdio.h>
int needless(lua_State *L)
{
printf("bullshit\n");
return 0;
}
static const struct luaL_Reg noise[] = {
{"needless",needless},
{NULL,NULL}
};
__declspec(dllexport) int __cdecl luaopen_noise(lua_State *L)
{
luaL_newlib(L, noise);
return 1;
}
when I link the resulting dll with "import noise" in lua5.2 interpreter, I get that "multiple lua VMs detected" for reason that eludes me. What should I do to fix make it work?