#7 lua problems

open
nobody
None
5
2010-06-12
2010-06-12
No

Hello,

I'm trying to compile on an 64bit arch linux system, but get following errors:

src/luautils.cpp: In member function ‘virtual void TLuaAccess::LoadStdLibs()’:
src/luautils.cpp:164:26: error: ‘lua_baselibopen’ was not declared in this scope
src/luautils.cpp:165:25: error: ‘lua_tablibopen’ was not declared in this scope
src/luautils.cpp:166:25: error: ‘lua_strlibopen’ was not declared in this scope
src/luautils.cpp:167:26: error: ‘lua_mathlibopen’ was not declared in this scope
src/luautils.cpp: In member function ‘bool TLuaAccess::LoadFile(std::string, int)’:
src/luautils.cpp:184:34: error: ‘lua_dofile’ was not declared in this scope
src/luautils.cpp: In static member function ‘static int TLuaCuboLib::SCORE_Load(lua_State*)’:
src/luautils.cpp:1363:29: error: ‘lua_dofile’ was not declared in this scope
src/luautils.cpp: In static member function ‘static int TLuaCuboLib::SAVE_Load(lua_State*)’:
src/luautils.cpp:1411:29: error: ‘lua_dofile’ was not declared in this scope
src/luautils.cpp: In static member function ‘static int TLuaCuboLib::INCLUDE(lua_State*)’:
src/luautils.cpp:2047:29: error: ‘lua_dofile’ was not declared in this scope
src/luautils.cpp: In static member function ‘static int TLuaCuboLib::CONFIG_Load(lua_State*)’:
src/luautils.cpp:2064:29: error: ‘lua_dofile’ was not declared in this scope
make: *** [cubo] Error 1

I have lua5.1 installed, so that might be the problem?

I guess this could be seen as a feature request to support 5.1 then :)

Discussion

  • Exosphere
    Exosphere
    2010-06-12

    You're absolutely right! Since Lua is available in much newer versions, Cubo should move to the current Lua version.
    lua_dofile must be substituted (or #defined) by luaL_dofile, I think!