I cannot use luabridge without having the following line:
luaL_openlibs(lState);
And I don't even use its library functions.
I get this error :
Assertion failed: lua_istable (L, -1)
Just my adding "luaL_openlibs(lState)", no problems occur, but I don't want to use lua's libraries and want to make sure that they are not included.
My main function:
lua_State* lState = luaL_newstate();
//luaL_openlibs(lState);
getGlobalNamespace(lState).addFunction("log", print).beginNamespace("math").addFunction("sin", &std::sinf);
luaL_dofile(lState, "res/script.lua");
LuaRef start = getGlobal(lState, "start");
try {
start();
} catch (const LuaException& e) {
std::cout << e.what();
}
lua_close(lState);
std::cin.get();