Stratagus


Nmn

Still Fresh
Joined
Dec 27, 2005
Messages
80
OK, so I'm porting Stratagus now to the gp2x. This is a 2D RTS Engine that uses lua. In addition, a data converter (among many other things, it has its own AI scripts and such that are included) called Wargus will allow you to play Stratagus with War Craft II dos data (Although it doesn't play exactly alike, it does extremely close).

Why not War Craft 3? Well, nobodies taken the challenge on, but blizzard would certainly sue them up the ass if they did. BTW, there is data converters for everything related to War 3 so i seriously doubt that finding format data is impossible (Or heaven forbid you have to disassemble...). But the point is, that won't run fast enough anyways, and if it wasn't written in opengl, theres a problem...

anyways, this isn't about why or why not about warcraft porting or even wargus for that matter... Just a short summery of things. Enough about it. Want to know more? Google is your friend :)

Heres the prob... I'm blasting through things, got lua 5.1 working and fixed tolua to compile with 5.1... And i believe it stops at the very last compilation, of the executable i believe. I know theres a huge linking error on my problem. I almost know its related to static/dynamic linking somehow. Here is the only failure, i don't even get compile warnings during the whole compile:

Code:
gp2x-g++ -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -llua -I/home/nmn/gp2xdevkit/include -L/home/nmn/gp2xdevkit/lib -o stratagus src/action/obj/action_attack.o src/action/obj/action_board.o src/action/obj/action_build.o src/action/obj/action_die.o src/action/obj/action_follow.o src/action/obj/action_move.o src/action/obj/action_patrol.o src/action/obj/action_repair.o src/action/obj/action_research.o src/action/obj/action_resource.o src/action/obj/action_returngoods.o src/action/obj/action_spellcast.o src/action/obj/action_stand.o src/action/obj/action_still.o src/action/obj/action_train.o src/action/obj/action_unload.o src/action/obj/action_upgradeto.o src/action/obj/actions.o src/action/obj/command.o src/ai/obj/ai.o src/ai/obj/ai_building.o src/ai/obj/ai_force.o src/ai/obj/ai_magic.o src/ai/obj/ai_plan.o src/ai/obj/ai_resource.o src/ai/obj/script_ai.o src/beos/obj/beos.o src/editor/obj/script_editor.o src/editor/obj/editloop.o src/editor/obj/editor.o src/editor/obj/edmap.o src/game/obj/game.o src/game/obj/loadgame.o src/game/obj/savegame.o src/game/obj/trigger.o src/guichan/obj/cliprectangle.o src/guichan/obj/color.o src/guichan/obj/defaultfont.o src/guichan/obj/exception.o src/guichan/obj/focushandler.o src/guichan/obj/gfont.o src/guichan/obj/graphics.o src/guichan/obj/gui.o src/guichan/obj/guichan.o src/guichan/obj/image.o src/guichan/obj/imagefont.o src/guichan/obj/key.o src/guichan/obj/keyinput.o src/guichan/obj/mouseinput.o src/guichan/obj/rectangle.o src/guichan/sdl/obj/gsdl.o src/guichan/sdl/obj/sdlgraphics.o src/guichan/sdl/obj/sdlimageloader.o src/guichan/sdl/obj/sdlinput.o src/guichan/obj/widget.o src/guichan/widgets/obj/button.o src/guichan/widgets/obj/checkbox.o src/guichan/widgets/obj/container.o src/guichan/widgets/obj/dropdown.o src/guichan/widgets/obj/icon.o src/guichan/widgets/obj/label.o src/guichan/widgets/obj/listbox.o src/guichan/widgets/obj/radiobutton.o src/guichan/widgets/obj/scrollarea.o src/guichan/widgets/obj/slider.o src/guichan/widgets/obj/textbox.o src/guichan/widgets/obj/textfield.o src/guichan/widgets/obj/window.o src/map/obj/script_map.o src/map/obj/script_tileset.o src/map/obj/map.o src/map/obj/map_draw.o src/map/obj/map_fog.o src/map/obj/map_radar.o src/map/obj/map_save.o src/map/obj/map_wall.o src/map/obj/minimap.o src/map/obj/tileset.o src/network/obj/commands.o src/network/obj/lowlevel.o src/network/obj/master.o src/network/obj/netconnect.o src/network/obj/network.o src/pathfinder/obj/astar.o src/pathfinder/obj/script_pathfinder.o src/pathfinder/obj/pathfinder.o src/sound/obj/script_sound.o src/sound/obj/mikmod.o src/sound/obj/music.o src/sound/obj/ogg.o src/sound/obj/sound.o src/sound/obj/sound_id.o src/sound/obj/sound_server.o src/sound/obj/unitsound.o src/sound/obj/wav.o src/stratagus/obj/construct.o src/stratagus/obj/groups.o src/stratagus/obj/iolib.o src/stratagus/obj/mainloop.o src/stratagus/obj/missile.o src/stratagus/obj/player.o src/stratagus/obj/script.o src/stratagus/obj/script_missile.o src/stratagus/obj/script_player.o src/stratagus/obj/script_spell.o src/stratagus/obj/selection.o src/stratagus/obj/spells.o src/stratagus/obj/stratagus.o src/stratagus/obj/translate.o src/stratagus/obj/util.o src/tolua/obj/tolua.o src/tolua/obj/tolua_event.o src/tolua/obj/tolua_is.o src/tolua/obj/tolua_map.o src/tolua/obj/tolua_push.o src/tolua/obj/tolua_to.o src/ui/obj/botpanel.o src/ui/obj/button_checks.o src/ui/obj/script_ui.o src/ui/obj/icons.o src/ui/obj/interface.o src/ui/obj/mainscr.o src/ui/obj/menu_proc.o src/ui/obj/menus.o src/ui/obj/mouse.o src/ui/obj/ui.o src/ui/obj/widgets.o src/unit/obj/depend.o src/unit/obj/script_unit.o src/unit/obj/script_unittype.o src/unit/obj/unit.o src/unit/obj/unit_cache.o src/unit/obj/unit_draw.o src/unit/obj/unit_find.o src/unit/obj/unittype.o src/unit/obj/upgrade.o src/video/obj/cursor.o src/video/obj/font.o src/video/obj/graphic.o src/video/obj/linedraw.o src/video/obj/mng.o src/video/obj/movie.o src/video/obj/png.o src/video/obj/sdl.o src/video/obj/sprite.o src/video/obj/video.o -O2 -pipe -fsigned-char -fomit-frame-pointer -fexpensive-optimizations -ffast-math -L/home/nmn/gp2xdevkit/lib -llua -lbz2 -lvorbis -logg -lmikmod -lSDL -lpthread -lpng -lz -lm
src/tolua/obj/tolua_map.o: In function `tolua_newmetatable(lua_State*, char*)':
tolua_map.cpp:(.text+0x20): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `mapsuper(lua_State*, char const*, char const*)':
tolua_map.cpp:(.text+0x40): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x4c): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x5c): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0x68): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x74): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x88): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x94): undefined reference to `lua_pushboolean(lua_State*, int)'
tolua_map.cpp:(.text+0xa0): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xb0): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0xbc): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0xc8): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0xe0): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xec): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xfc): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x10c): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0x118): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0x124): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x130): undefined reference to `lua_pushnil(lua_State*)'
tolua_map.cpp:(.text+0x138): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0x144): undefined reference to `lua_insert(lua_State*, int)'
tolua_map.cpp:(.text+0x150): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x15c): undefined reference to `lua_next(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `mapinheritance(lua_State*, char const*, char const*)':
tolua_map.cpp:(.text+0x190): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0x1b0): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x1c8): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0x1d4): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x1e8): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x1f4): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x200): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x214): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x220): undefined reference to `lua_insert(lua_State*, int)'
tolua_map.cpp:(.text+0x22c): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x238): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x248): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x258): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x260): undefined reference to `lua_pushnil(lua_State*)'
tolua_map.cpp:(.text+0x26c): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x280): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x28c): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x29c): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x2ac): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x2bc): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x2cc): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x2d8): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x2e4): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x2f0): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x304): undefined reference to `lua_getfield(lua_State*, int, char const*)'
src/tolua/obj/tolua_map.o: In function `tolua_bnd_type(lua_State*)':
tolua_map.cpp:(.text+0x328): undefined reference to `lua_gettop(lua_State*)'
src/tolua/obj/tolua_map.o: In function `tolua_register_gc':
tolua_map.cpp:(.text+0x34c): undefined reference to `lua_touserdata(lua_State*, int)'
tolua_map.cpp:(.text+0x35c): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x368): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x374): undefined reference to `lua_pushlightuserdata(lua_State*, void*)'
tolua_map.cpp:(.text+0x380): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x38c): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x3a4): undefined reference to `lua_pushlightuserdata(lua_State*, void*)'
tolua_map.cpp:(.text+0x3b0): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x3bc): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x3cc): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_bnd_takeownership(lua_State*)':
tolua_map.cpp:(.text+0x3ec): undefined reference to `lua_isuserdata(lua_State*, int)'
tolua_map.cpp:(.text+0x410): undefined reference to `lua_pushboolean(lua_State*, int)'
tolua_map.cpp:(.text+0x41c): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x430): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x440): undefined reference to `lua_gc(lua_State*, int, int)'
src/tolua/obj/tolua_map.o: In function `tolua_bnd_releaseownership(lua_State*)':
tolua_map.cpp:(.text+0x460): undefined reference to `lua_isuserdata(lua_State*, int)'
tolua_map.cpp:(.text+0x47c): undefined reference to `lua_pushboolean(lua_State*, int)'
tolua_map.cpp:(.text+0x488): undefined reference to `lua_touserdata(lua_State*, int)'
tolua_map.cpp:(.text+0x49c): undefined reference to `lua_gc(lua_State*, int, int)'
tolua_map.cpp:(.text+0x4a8): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x4b4): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x4c0): undefined reference to `lua_pushlightuserdata(lua_State*, void*)'
tolua_map.cpp:(.text+0x4cc): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x4d8): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x4e8): undefined reference to `lua_rawequal(lua_State*, int, int)'
tolua_map.cpp:(.text+0x4fc): undefined reference to `lua_pushlightuserdata(lua_State*, void*)'
tolua_map.cpp:(.text+0x504): undefined reference to `lua_pushnil(lua_State*)'
tolua_map.cpp:(.text+0x510): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x51c): undefined reference to `lua_pushboolean(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_bnd_cast(lua_State*)':
tolua_map.cpp:(.text+0x53c): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x5b0): undefined reference to `lua_pushnil(lua_State*)'
src/tolua/obj/tolua_map.o: In function `tolua_bnd_inherit(lua_State*)':
tolua_map.cpp:(.text+0x5c8): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x5d4): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0x5e0): undefined reference to `lua_rawset(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_beginmodule':
tolua_map.cpp:(.text+0x600): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x610): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x61c): undefined reference to `lua_pushvalue(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_endmodule':
tolua_map.cpp:(.text+0x628): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_module':
tolua_map.cpp:(.text+0x740): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x74c): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x758): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x76c): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x77c): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x788): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x794): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0x7a0): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x7bc): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0x7d8): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x7ec): undefined reference to `lua_getmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x804): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x810): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x81c): undefined reference to `lua_pushvalue(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_function':
tolua_map.cpp:(.text+0x834): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x844): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0x854): undefined reference to `lua_rawset(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_open':
tolua_map.cpp:(.text+0x860): undefined reference to `lua_gettop(lua_State*)'
tolua_map.cpp:(.text+0x870): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x87c): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0x888): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0x89c): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x8a8): undefined reference to `lua_pushboolean(lua_State*, int)'
tolua_map.cpp:(.text+0x8b4): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x8c0): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x8d0): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x8e0): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x8f0): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x900): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x90c): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x918): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x924): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x930): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x940): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x950): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x960): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x970): undefined reference to `lua_pushlstring(lua_State*, char const*, unsigned int)'
tolua_map.cpp:(.text+0x97c): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x988): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0x994): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x9a0): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x9b0): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x9bc): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0x9c8): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0x9d8): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0x9e4): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xa98): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_cclass':
tolua_map.cpp:(.text+0xbd0): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xbe0): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0xbec): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xc00): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xc0c): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xc18): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xc28): undefined reference to `lua_getfield(lua_State*, int, char const*)'
tolua_map.cpp:(.text+0xc34): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xc44): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xc50): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xc5c): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_constant':
tolua_map.cpp:(.text+0xc84): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xca4): undefined reference to `lua_rawset(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_variable':
tolua_map.cpp:(.text+0xcc0): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xccc): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0xcd8): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0xcec): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xcfc): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0xd08): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xd14): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0xd20): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xd2c): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xd3c): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xd48): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xd54): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xd68): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xd74): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0xd80): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0xd94): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xda4): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0xdb0): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xdbc): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0xdc8): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xdd4): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xde4): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xdf0): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xe00): undefined reference to `lua_settop(lua_State*, int)'
src/tolua/obj/tolua_map.o: In function `tolua_array':
tolua_map.cpp:(.text+0xe3c): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xe48): undefined reference to `lua_rawget(lua_State*, int)'
tolua_map.cpp:(.text+0xe54): undefined reference to `lua_type(lua_State*, int)'
tolua_map.cpp:(.text+0xe68): undefined reference to `lua_settop(lua_State*, int)'
tolua_map.cpp:(.text+0xe78): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0xe84): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xe90): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0xe9c): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xea8): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xeb8): undefined reference to `lua_createtable(lua_State*, int, int)'
tolua_map.cpp:(.text+0xec4): undefined reference to `lua_pushvalue(lua_State*, int)'
tolua_map.cpp:(.text+0xed0): undefined reference to `lua_setmetatable(lua_State*, int)'
tolua_map.cpp:(.text+0xedc): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xeec): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xef8): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xf04): undefined reference to `lua_pushstring(lua_State*, char const*)'
tolua_map.cpp:(.text+0xf1c): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
tolua_map.cpp:(.text+0xf28): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xf34): undefined reference to `lua_rawset(lua_State*, int)'
tolua_map.cpp:(.text+0xf44): undefined reference to `lua_settop(lua_State*, int)'
collect2: ld returned 1 exit status

Heres some info about my dev environment. Its ooPo's GP2XDev and its installed at /home/nmn/gp2xdevkit/. It compiles fine, it works on everything i've tried so far, except that the move from GCC 3 to 4 causes too many compile errors on the source of my flash player :blink:
 
Code:
gp2x-g++ -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -llua -I/home/nmn/gp2xdevkit/include -L/home/nmn/gp2xdevkit/lib -o stratagus src/action/obj/action_attack.o src/action/obj/action_board.o src/action/obj/action_build.o src/action/obj/action_die.o src/action/obj/action_follow.o src/action/obj/action_move.o ... -O2 -pipe -fsigned-char -fomit-frame-pointer -fexpensive-optimizations -ffast-math -L/home/nmn/gp2xdevkit/lib -llua -lbz2 -lvorbis -logg -lmikmod -lSDL -lpthread -lpng -lz -lm
src/tolua/obj/tolua_map.o: In function `tolua_newmetatable(lua_State*, char*)':
tolua_map.cpp:(.text+0x20): undefined reference to `lua_settop(lua_State*, int)'
...
tolua_map.cpp:(.text+0xf44): undefined reference to `lua_settop(lua_State*, int)'
collect2: ld returned 1 exit status
This looks like a C++ vs C problem. As you can see your files expect C++ functions, since they have type names.
Try a nm -A liblua.a | grep lua_settop and see if it contains type names. If no, then you should read this http://www.lua.org/pil/24.1.html.
 
Last edited by a moderator:
Thanks Laurent! I have cd'd to my 2x lib directory, did the test and surely enough, i don't get any type names.

In case you meant something else, heres the output.

Code:
liblua.a:lapi.o:00000000000002ac T lua_settop
liblua.a:lauxlib.o:		 U lua_settop
liblua.a:lbaselib.o:		 U lua_settop
liblua.a:ldblib.o:		 U lua_settop
liblua.a:liolib.o:		 U lua_settop
liblua.a:loslib.o:		 U lua_settop
liblua.a:ltablib.o:		 U lua_settop
liblua.a:lstrlib.o:		 U lua_settop
liblua.a:loadlib.o:		 U lua_settop

In the meantime, I'll check out the link. I almost forgot about C/C++ compatibility...
 
Thanks Laurent! I have cd'd to my 2x lib directory, did the test and surely enough, i don't get any type names.

In case you meant something else, heres the output.

Code:
liblua.a:lapi.o:00000000000002ac T lua_settop
liblua.a:lauxlib.o:		 U lua_settop
liblua.a:lbaselib.o:		 U lua_settop
liblua.a:ldblib.o:		 U lua_settop
liblua.a:liolib.o:		 U lua_settop
liblua.a:loslib.o:		 U lua_settop
liblua.a:ltablib.o:		 U lua_settop
liblua.a:lstrlib.o:		 U lua_settop
liblua.a:loadlib.o:		 U lua_settop

In the meantime, I'll check out the link. I almost forgot about C/C++ compatibility...
Your LUA library has been compiled in C, so yes the link should provide you with the answer :)
 
Last edited by a moderator:
You know, i was reading that page earlier... and quit, thinking it was useless. Now i feel stupid.

It compiled. I will be finishing up the port with some resolution changes and such. again, thanks.
 
Thanks! Right now its hanging, i'll be debugging it and using the game World Domination as a test. but i will test it with War Gus before i'm done, don't worry.

Edit: Its actually the game thats freezing it i believe... It won't run in linux either, due to an error in the scripts. Testing it with wargus, NOW.
 
wargus would be fine, i havent really tried wargus, but back when it was one project, freecraft, i tried it, was nice, allowed me to play first of all on a real OS, one i use, and also, ina nice resolution.
 
I also played it when it was freecraft. But even now i still need a recursive gunzip command to make the data files work.

BTW, its running now, but it says "error in error handling" on stderr and doesn't load. And also, i need to learn how to use the HW scaler in the HW sdl :)... But all of this is still during tests without wargus. Since it will probably work with wargus, its up next.

Warcraft II on your gp2x? Who thinks it'll be a fun idea?
 
I thought that what you do to use the scaling is to set the screen size to something it cannot possibly be (ie 640x480), I guess that doesn't work. I should check it out.
 
Not sure. If so, i'm in luck.

If anyones willing to help... I get an error in error handling message on stderr when it crashes. I'm checking it out but i haven't found why it would do this.
 
Back
Top