[HELP] Compile errors with luaaa
yorkane opened this issue · 2 comments
c++ -march=native -O3 -std=c++11 -o demo amalgamation_demo.cpp -I include/roaring/ -I /usr/local/openresty/luajit/include/luajit-2.1/
/tmp/ccU0wBoY.o: In function bindToLUA(lua_State*)': amalgamation_demo.cpp:(.text+0x3d5): undefined reference to
luaL_argerror'
amalgamation_demo.cpp:(.text+0x4c6): undefined reference to luaL_newmetatable' amalgamation_demo.cpp:(.text+0x4d3): undefined reference to
lua_pushvalue'
amalgamation_demo.cpp:(.text+0x4e5): undefined reference to lua_setfield' amalgamation_demo.cpp:(.text+0x4f7): undefined reference to
luaL_checkstack'
amalgamation_demo.cpp:(.text+0x514): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x523): undefined reference to
lua_pushcclosure'
amalgamation_demo.cpp:(.text+0x530): undefined reference to lua_settable' amalgamation_demo.cpp:(.text+0x54a): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0x557): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x5a1): undefined reference to
luaL_register'
amalgamation_demo.cpp:(.text+0x5ae): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x609): undefined reference to
luaL_register'
amalgamation_demo.cpp:(.text+0x616): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x62a): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x637): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x644): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x680): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x68d): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x69a): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x6ae): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x6bb): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x6c8): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x6f7): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x704): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x711): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x725): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x732): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x73f): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x76e): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x77b): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x788): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x79c): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x7a9): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x7b6): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x7e5): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x7f2): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x7ff): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x813): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x820): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x82d): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x85c): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x869): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x876): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x88a): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x897): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x8a4): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x8ca): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x8d7): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x8e4): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x8f8): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x905): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x912): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0x941): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x94e): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x95b): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x96f): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x97c): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x989): undefined reference to
lua_pushstring'
amalgamation_demo.cpp:(.text+0x996): undefined reference to lua_settable' amalgamation_demo.cpp:(.text+0x9a3): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0xa3d): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xa4f): undefined reference to
lua_pushinteger'
amalgamation_demo.cpp:(.text+0xa66): undefined reference to lua_setfield' amalgamation_demo.cpp:(.text+0xa9d): undefined reference to
luaL_openlib'
amalgamation_demo.cpp:(.text+0xaaf): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0xac6): undefined reference to
lua_setfield'
amalgamation_demo.cpp:(.text+0xcf1): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xd0a): undefined reference to
lua_createtable'
amalgamation_demo.cpp:(.text+0xd37): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0xd51): undefined reference to
lua_rawseti'
amalgamation_demo.cpp:(.text+0xd71): undefined reference to lua_setfield' amalgamation_demo.cpp:(.text+0xdb3): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0xde4): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xe26): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0xe5b): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xe9d): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0xed2): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xf14): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text+0xf49): undefined reference to luaL_openlib' amalgamation_demo.cpp:(.text+0xfcb): undefined reference to
luaL_openlib'
amalgamation_demo.cpp:(.text+0xfe0): undefined reference to lua_pushnumber' amalgamation_demo.cpp:(.text+0xff7): undefined reference to
lua_setfield'
amalgamation_demo.cpp:(.text+0x116f): undefined reference to luaL_argerror' amalgamation_demo.cpp:(.text+0x1254): undefined reference to
luaL_newmetatable'
amalgamation_demo.cpp:(.text+0x1261): undefined reference to lua_pushvalue' amalgamation_demo.cpp:(.text+0x1273): undefined reference to
lua_setfield'
amalgamation_demo.cpp:(.text+0x1285): undefined reference to luaL_checkstack' amalgamation_demo.cpp:(.text+0x12a4): undefined reference to
lua_pushstring'
amalgamation_demo.cpp:(.text+0x12b2): undefined reference to lua_pushcclosure' amalgamation_demo.cpp:(.text+0x12bf): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x12d9): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x12e6): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0x132a): undefined reference to luaL_register' amalgamation_demo.cpp:(.text+0x1337): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0x1379): undefined reference to luaL_register' amalgamation_demo.cpp:(.text+0x1386): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0x139a): undefined reference to lua_getfield' amalgamation_demo.cpp:(.text+0x13a7): undefined reference to
lua_pushstring'
amalgamation_demo.cpp:(.text+0x13b4): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x13c1): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x13ce): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x13e2): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text+0x13ef): undefined reference to lua_pushstring' amalgamation_demo.cpp:(.text+0x13fc): undefined reference to
lua_pushinteger'
amalgamation_demo.cpp:(.text+0x1409): undefined reference to lua_settable' amalgamation_demo.cpp:(.text+0x1416): undefined reference to
lua_settop'
amalgamation_demo.cpp:(.text+0x142a): undefined reference to lua_getfield' amalgamation_demo.cpp:(.text+0x1437): undefined reference to
lua_pushstring'
amalgamation_demo.cpp:(.text+0x1446): undefined reference to lua_pushinteger' amalgamation_demo.cpp:(.text+0x1453): undefined reference to
lua_settable'
amalgamation_demo.cpp:(.text+0x1460): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x15bb): undefined reference to
luaL_argerror'
amalgamation_demo.cpp:(.text+0x169e): undefined reference to luaL_argerror' amalgamation_demo.cpp:(.text+0x177e): undefined reference to
luaL_argerror'
amalgamation_demo.cpp:(.text+0x186a): undefined reference to luaL_argerror' amalgamation_demo.cpp:(.text+0x195a): undefined reference to
luaL_argerror'
/tmp/ccU0wBoY.o:amalgamation_demo.cpp:(.text+0x1a4a): more undefined references to luaL_argerror' follow /tmp/ccU0wBoY.o: In function
runLuaExample(lua_State*)':
amalgamation_demo.cpp:(.text+0x324f): undefined reference to luaL_loadbuffer' amalgamation_demo.cpp:(.text+0x3294): undefined reference to
lua_tolstring'
amalgamation_demo.cpp:(.text+0x32b2): undefined reference to lua_settop' amalgamation_demo.cpp:(.text+0x3864): undefined reference to
lua_pcall'
/tmp/ccU0wBoY.o: In function luaaa::LuaClass<int*>::LuaClass(lua_State*, std::string const&, luaL_Reg const*)::HelperClass::f__gc(lua_State*)': amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiEC1EP9lua_StateRKSsPK8luaL_RegEN11HelperClass5f__gcES4_[_ZZN5luaaa8LuaClassIPiEC1EP9lua_StateRKSsPK8luaL_RegEN11HelperClass5f__gcES4_]+0x11): undefined reference to
luaL_checkudata'
/tmp/ccU0wBoY.o: In function luaaa::LuaClass<int*>& luaaa::LuaClass<int*>::ctor<>(char const*)::HelperClass::f_new(lua_State*)': amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x32): undefined reference to
lua_newuserdata'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x4e): undefined reference to lua_getfield' amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x5b): undefined reference to
lua_setmetatable'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIEEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x7c): undefined reference to lua_pushnil' /tmp/ccU0wBoY.o: In function
luaaa::LuaClass<int*>& luaaa::LuaClass<int*>::ctor<int*>(char const*)::HelperClass::f_new(lua_State*)':
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x48): undefined reference to lua_type' amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x57): undefined reference to
lua_touserdata'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x77): undefined reference to lua_newuserdata' amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x97): undefined reference to
lua_getfield'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0xa4): undefined reference to lua_setmetatable' amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0xc6): undefined reference to
luaL_checkudata'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0xe9): undefined reference to luaL_argerror' amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0xf6): undefined reference to
luaL_checkudata'
amalgamation_demo.cpp:(.text._ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State[_ZZN5luaaa8LuaClassIPiE4ctorIIS1_EEERS2_PKcEN11HelperClass5f_newEP9lua_State]+0x11c): undefined reference to `lua_pushnil'
thank you, I will try it later