All pastes #955509 Raw Edit

Linking error2

public text v1 · immutable
#955509 ·published 2008-03-24 18:08 UTC
rendered paste body
CC -o src/ai_attack.o -c -O3 -library=stlport4 -staticlib=stlport4 -norunpath -features=tmplife -features=tmplrefstatic -features=extensions -DSVNREV='"25073M"' -Isrc -I/usr/include/SDL -I/usr/include/python2.4 -Isrc/server src/ai_attack.cpp
CC -o src/formula_ai.o -c -O3 -library=stlport4 -staticlib=stlport4 -norunpath -features=tmplife -features=tmplrefstatic -features=extensions -DSVNREV='"25073M"' -Isrc -I/usr/include/SDL -I/usr/include/python2.4 -Isrc/server src/formula_ai.cpp
CC -o wesnoth -library=stlport4 -staticlib=stlport4 -lsocket -lnsl -lboost_iostreams -L. -R. src/game.o src/about.o src/actions.o src/ai.o src/ai_dfool.o src/ai_attack.o src/ai_move.o src/ai_python.o src/ai_village.o src/animated_game.o src/attack_prediction.o src/callable_objects.o src/config_adapter.o src/dialogs.o src/floating_textbox.o src/formula.o src/formula_ai.o src/formula_function.o src/formula_tokenizer.o src/game_display.o src/game_events.o src/game_preferences.o src/game_preferences_display.o src/gamestatus.o src/generate_report.o src/halo.o src/help.o src/intro.o src/leader_list.o src/menu_events.o src/mouse_events.o src/multiplayer.o src/multiplayer_ui.o src/multiplayer_wait.o src/multiplayer_connect.o src/multiplayer_create.o src/multiplayer_lobby.o src/pathfind.o src/playcampaign.o src/play_controller.o src/playmp_controller.o src/playsingle_controller.o src/playturn.o src/replay.o src/replay_controller.o src/sha1.o src/settings.o src/statistics.o src/team.o src/terrain_filter.o src/titlescreen.o src/unit.o src/unit_abilities.o src/unit_animation.o src/unit_display.o src/unit_frame.o src/unit_map.o src/unit_types.o src/upload_log.o src/variable.o src/variant.o src/widgets/combo.o src/widgets/scrollpane.o -L. -L/lib -L/usr/lib -lwesnoth_core -lwesnoth_sdl -lwesnoth -lcampaignd -lSDL_net -lSDL_ttf -lSDL_mixer -lSDL_image -lSDL -lboost_iostreams-mt -lboost_regex -lpthread -lpython2.4
Undefined			first referenced
 symbol  			    in file
double ai::power_projection(const gamemap::location&,const std::multimap<gamemap::location,gamemap::location,std::less<gamemap::location>,std::allocator<std::pair<const gamemap::location,gamemap::location> > >&,bool)const src/formula_ai.o
bool ai::should_retreat(const gamemap::location&,const unit_map::const_iterator,const std::multimap<gamemap::location,gamemap::location,std::less<gamemap::location>,std::allocator<std::pair<const gamemap::location,gamemap::location> > >&,const std::multimap<gamemap::location,gamemap::location,std::less<gamemap::location>,std::allocator<std::pair<const gamemap::location,gamemap::location> > >&,const std::multimap<gamemap::location,gamemap::location,std::less<gamemap::location>,std::allocator<std::pair<const gamemap::location,gamemap::location> > >&,double) src/formula_ai.o
ld: fatal: Symbol referencing errors. No output written to wesnoth
scons: *** [wesnoth] Error 1


but:
nm -C ai_attack.o | grep power_projection
[264]	|     17044|      2081|FUNC |GLOB |0    |83     |double ai::power_projection(const gamemap::location&,const std::multimap<gamemap::location,gamemap::location,std::less<gamemap::location>,std::allocator<std::pair<const gamemap::location,gamemap::location> > >&,bool)const
						       [__1cCaiQpower_projection6kMrknHgamemapIlocation_rknDstdImultimap4n0C_n0C_n0DEless4n0C___n0DJallocator4n0DEpair4Ck2n0C_______b_d_]

I output only first problematic function.


And linking command:
CC -o wesnoth -library=stlport4 -staticlib=stlport4 -lsocket -lnsl -lboost_iostreams -L. -R. src/game.o src/about.o src/actions.o src/ai.o src/ai_dfool.o src/ai_attack.o src/ai_move.o src/ai_python.o src/ai_village.o src/animated_game.o src/attack_prediction.o src/callable_objects.o src/config_adapter.o src/dialogs.o src/floating_textbox.o src/formula.o src/formula_ai.o src/formula_function.o src/formula_tokenizer.o src/game_display.o src/game_events.o src/game_preferences.o src/game_preferences_display.o src/gamestatus.o src/generate_report.o src/halo.o src/help.o src/intro.o src/leader_list.o src/menu_events.o src/mouse_events.o src/multiplayer.o src/multiplayer_ui.o src/multiplayer_wait.o src/multiplayer_connect.o src/multiplayer_create.o src/multiplayer_lobby.o src/pathfind.o src/playcampaign.o src/play_controller.o src/playmp_controller.o src/playsingle_controller.o src/playturn.o src/replay.o src/replay_controller.o src/sha1.o src/settings.o src/statistics.o src/team.o src/terrain_filter.o src/titlescreen.o src/unit.o src/unit_abilities.o src/unit_animation.o src/unit_display.o src/unit_frame.o src/unit_map.o src/unit_types.o src/upload_log.o src/variable.o src/variant.o src/widgets/combo.o src/widgets/scrollpane.o -L. -L/lib -L/usr/lib -lwesnoth_core -lwesnoth_sdl -lwesnoth -lcampaignd -lSDL_net -lSDL_ttf -lSDL_mixer -lSDL_image -lSDL -lboost_iostreams-mt -lboost_regex -lpthread -lpython2.4