From 167bdf759d819bf6e0448904c56f878c36e6e462 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 13 Oct 2012 10:30:19 +0200 Subject: [PATCH] load LUA standard library earlier --- createHierarchy.cpp | 2 +- extractor.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/createHierarchy.cpp b/createHierarchy.cpp index 51778b1e5..acd6faaa9 100644 --- a/createHierarchy.cpp +++ b/createHierarchy.cpp @@ -129,7 +129,7 @@ int main (int argc, char *argv[]) { // Connect LuaBind to this lua state luabind::open(myLuaState); - + luaL_openlibs(myLuaState); // Now call our function in a lua script INFO("Parsing speedprofile from " << (argc > 3 ? argv[3] : "profile.lua") ); diff --git a/extractor.cpp b/extractor.cpp index 31d59834d..df6bf8f99 100644 --- a/extractor.cpp +++ b/extractor.cpp @@ -87,10 +87,10 @@ int main (int argc, char *argv[]) { // Connect LuaBind to this lua state luabind::open(myLuaState); + luaL_openlibs(myLuaState); // Add our function to the state's global scope luabind::module(myLuaState) [ - luabind::def("print", LUA_print), luabind::def("parseMaxspeed", parseMaxspeed), luabind::def("durationIsValid", durationIsValid), luabind::def("parseDuration", parseDuration) @@ -147,9 +147,6 @@ int main (int argc, char *argv[]) { ERR(lua_tostring(myLuaState,-1)<< " occured in scripting block"); } - //open utility libraries string library; - luaL_openlibs(myLuaState); - /*** End of Scripting Environment Setup; ***/ unsigned amountOfRAM = 1;