My Lua Libs Have Gone Nuts


Sephnroth

Member
Joined
Dec 25, 2005
Messages
151
Age
39
Location
UK
Website
Visit site
this has had me unable to actually build ttx for a couple of days now and is making a mockery of my desired beta release date which is now in only 3 days -_- nothing I can do can fix it.

basically, I was happilly compiling and building ttx on my new pc setup. I had migrated my project over, got a fresh install of the devkit going and everything WAS working great with visual studio 2005e, everything compiled and built etc etc. Randomly when I went to continue doing some coding the other day i went to build and boom, unresolved lua externals. to be precise:

Code:
Debug\ScriptEngine.o: In function `InitScriptEngine()':
ScriptEngine.cpp:(.text+0x414): undefined reference to `lua_open()'
Debug\ScriptEngine.o: In function `KillScriptEngine()':
ScriptEngine.cpp:(.text+0x47c): undefined reference to `lua_setgcthreshold(lua_State*, int)'
ScriptEngine.cpp:(.text+0x488): undefined reference to `lua_close(lua_State*)'
Debug\ScriptEngine.o: In function `LoadScript(char const*)':
ScriptEngine.cpp:(.text+0x254c): undefined reference to `lua_pcall(lua_State*, int, int, int)'
Debug\ScriptEngine.o: In function `CallScriptFunction(lua_State*, char const*, char const*, ...)':
ScriptEngine.cpp:(.text+0x2594): undefined reference to `lua_pushstring(lua_State*, char const*)'
ScriptEngine.cpp:(.text+0x25a0): undefined reference to `lua_gettable(lua_State*, int)'
ScriptEngine.cpp:(.text+0x2610): undefined reference to `lua_pushstring(lua_State*, char const*)'
ScriptEngine.cpp:(.text+0x2634): undefined reference to `lua_pushnumber(lua_State*, double)'
ScriptEngine.cpp:(.text+0x2674): undefined reference to `lua_pcall(lua_State*, int, int, int)'
ScriptEngine.cpp:(.text+0x26b8): undefined reference to `lua_isnumber(lua_State*, int)'
ScriptEngine.cpp:(.text+0x26dc): undefined reference to `lua_tonumber(lua_State*, int)'
ScriptEngine.cpp:(.text+0x2704): undefined reference to `lua_isnumber(lua_State*, int)'
ScriptEngine.cpp:(.text+0x2728): undefined reference to `lua_tonumber(lua_State*, int)'
ScriptEngine.cpp:(.text+0x2740): undefined reference to `lua_tostring(lua_State*, int)'
ScriptEngine.cpp:(.text+0x2758): undefined reference to `lua_isstring(lua_State*, int)'
ScriptEngine.cpp:(.text+0x277c): undefined reference to `lua_tostring(lua_State*, int)'
ScriptEngine.cpp:(.text+0x279c): undefined reference to `lua_pushnumber(lua_State*, double)'

not impressed. this is where it gets upsettingly funny though. if I remove any of the lua libraries (liblua and liblualib) from the linker command line then it throws a whole bunch more unresolved externals so it really IS finding and linking with the libraries, it just cant for some reason find those bloody functions! I downloaded fresh source for lua 5.0.2 (have never made lua 5.1.1 work properly and dont need anything new it offers) and recompiled it for arm using the devkit and cygwin, just like I did with the original libs I compiled, and its not helped at all. Nothing I do seems to fix this random throwing of errors. Anyone got any clues? im stumped and pretty pissed off with it after 2 days of this :/
 
I cannot tell you what is wrong but i develop my portage of lua.
I can send you a copy of my source send me a PM.

Best regards, Memiks.
 
try a different order, or even just including all (3?) of them a couple of times...

also maybe you accidentally delete a #include somewhere (e.g. lua open is #defined in lua.h )

luteijn@dollar:~/devel/gp2x/ttxalpha040306a-src/lua-source/lua-5.1/src$ grep lua_open *.h
lua.h:#define lua_open() luaL_newstate()


P.
 
Back
Top