Technical support > Mac
Linker error when building ufoai 2.5 on OS X 10.8
(1/1)
pete:
Hi,
I am trying to build 2.5 on my mac. I have followed the instructions from:
http://ufoai.org/wiki/Coding#Compiling_the_source
When I run "make" it compiles a lot of stuff and then I get this error:
--- Code: ---===> LD [base/cgame-campaign.dylib]
Undefined symbols for architecture x86_64:
"Com_Printf(char const*, ...)", referenced from:
AIR_UpdateHangarCapForOne(aircraft_s const*, base_s*) in cp_aircraft.cpp.o
AII_CollectItem(aircraft_s*, objDef_s const*, int) in cp_aircraft.cpp.o
AIR_NewAircraft(base_s*, aircraft_s const*) in cp_aircraft.cpp.o
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
AIR_LoadXML(mxml_node_s*) in cp_aircraft.cpp.o
AIR_LoadAircraftXML(mxml_node_s*, aircraft_s*) in cp_aircraft.cpp.o
AIR_PostLoadInitMissions() in cp_aircraft.cpp.o
...
"_Mem_Alloc(unsigned long, bool, memPool_t*, int, char const*, int)", referenced from:
MS_AddNewMessage(char const*, char const*, messageType_t, technology_s*, bool, bool) in cp_messages.cpp.o
AM_CreateUnitChr(autoUnit_s*, teamDef_s const*, equipDef_s const*) in cp_auto_mission.cpp.o
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"Com_DPrintf(int, char const*, ...)", referenced from:
AII_CollectItem(aircraft_s*, objDef_s const*, int) in cp_aircraft.cpp.o
AIR_NewAircraft(base_s*, aircraft_s const*) in cp_aircraft.cpp.o
AIR_MoveAircraftIntoNewHomebase(aircraft_s*, base_s*) in cp_aircraft.cpp.o
AIR_AircraftGetFromIDX(int) in cp_aircraft.cpp.o
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
AIR_GetDestinationWhilePursuing(aircraft_s const*, aircraft_s const*, float*) in cp_aircraft.cpp.o
AIR_GetDestinationFindRoot(float, float, float, float) in cp_aircraft.cpp.o
...
"FS_OpenFile(char const*, qFILE_s*, filemode_t)", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameQuickLoadInit_f() in cp_save.cpp.o
SAV_GameSaveNameCleanup_f() in cp_save.cpp.o
SAV_GameReadGameComment(int) in cp_save.cpp.o
"BEP_Evaluate(char const*, int (*)(char const*, void const*), void const*)", referenced from:
CP_TriggerEvent(campaignTriggerEventType_t, void const*) in cp_event.cpp.o
"FS_CloseFile(qFILE_s*)", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameQuickLoadInit_f() in cp_save.cpp.o
SAV_GameSaveNameCleanup_f() in cp_save.cpp.o
SAV_GameReadGameComment(int) in cp_save.cpp.o
"FS_WriteFile(void const*, unsigned long, char const*)", referenced from:
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"NET_ReadLong(dbuffer*)", referenced from:
CP_ParseCharacterData(dbuffer*, linkedList_t**) in cp_campaign.cpp.o
"Com_ParseList(char const**, linkedList_t**)", referenced from:
B_ParseBaseTemplate(char const*, char const**) in cp_base.cpp.o
CP_ParseAlienTeam(char const*, char const**) in cp_parse.cpp.o
RS_ParseTechnologies(char const*, char const**) in cp_research.cpp.o
MSO_ParseOption(char const*, char const**) in cp_messageoptions.cpp.o
"FS_FileLength(qFILE_s*)", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
"NET_ReadShort(dbuffer*)", referenced from:
CP_ParseCharacterData(dbuffer*, linkedList_t**) in cp_campaign.cpp.o
"NET_WriteByte(dbuffer*, unsigned char)", referenced from:
GAME_CP_InitializeBattlescape(linkedList_t const*) in cp_cgame_callbacks.cpp.o
"_Mem_FreePool(memPool_t*, char const*, int)", referenced from:
CP_ResetCampaignData() in cp_campaign.cpp.o
"Com_ParseBlock(char const*, char const**, void*, value_s const*, memPool_t*)", referenced from:
CP_ParseSalary(char const*, char const**, salary_s*) in cp_parse.cpp.o
CP_ParseComponents(char const*, char const**) in cp_parse.cpp.o
CL_ParseEventMails(char const*, char const**) in cp_event.cpp.o
CL_ParseNations(char const*, char const**) in cp_nation.cpp.o
CITY_Parse(char const*, char const**) in cp_nation.cpp.o
"FpCurve1D_u_in(double, double, double)", referenced from:
AM_CalculateTeamScores(autoMissionBattle_s*) in cp_auto_mission.cpp.o
"NET_WriteShort(dbuffer*, int)", referenced from:
GAME_CP_InitializeBattlescape(linkedList_t const*) in cp_cgame_callbacks.cpp.o
"GAME_GetTeamDef()", referenced from:
E_CreateEmployee(employeeType_t, nation_s const*, ugv_s const*) in cp_employee.cpp.o
"GAME_ReloadMode()", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
"_Mem_CreatePool(char const*, char const*, int)", referenced from:
CP_InitStartup() in cp_campaign.cpp.o
"_Mem_PoolStrDup(char const*, memPool_t*, int, char const*, int)", referenced from:
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
AIR_LoadAircraftXML(mxml_node_s*, aircraft_s*) in cp_aircraft.cpp.o
B_ParseBaseTemplate(char const*, char const**) in cp_base.cpp.o
B_ParseBuildings(char const*, char const**, bool) in cp_building.cpp.o
MS_AddNewMessage(char const*, char const*, messageType_t, technology_s*, bool, bool) in cp_messages.cpp.o
MS_LoadXML(mxml_node_s*) in cp_messages.cpp.o
CP_CreateBattleParameters(mission_s*, battleParam_s*, aircraft_s const*) in cp_missions.cpp.o
...
"Com_ParseBoolean(char const*)", referenced from:
GAME_CP_Results_f() in cp_cgame_callbacks.cpp.o
"INV_GetFilterType(itemFilterTypes_t)", referenced from:
PR_ProductionType_f() in cp_produce_callbacks.cpp.o
"_Mem_PoolStrDupTo(char const*, char**, memPool_t*, int, char const*, int)", referenced from:
CL_ParseCampaignEvents(char const*, char const**) in cp_event.cpp.o
"GAME_LoadCharacter(mxml_node_s*, character_s*)", referenced from:
E_LoadXML(mxml_node_s*) in cp_employee.cpp.o
"GAME_SaveCharacter(mxml_node_s*, character_s const*)", referenced from:
E_SaveXML(mxml_node_s*) in cp_employee.cpp.o
"LIST_CopyStructure(linkedList_t*)", referenced from:
CL_DisplayPopupInterceptMission(mission_s*) in cp_popup.cpp.o
CL_DisplayPopupInterceptUFO(aircraft_s*) in cp_popup.cpp.o
"Com_ParseBlockToken(char const*, char const**, void*, value_s const*, memPool_t*, char const*)", referenced from:
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
B_ParseBuildings(char const*, char const**, bool) in cp_building.cpp.o
CP_ParseCampaign(char const*, char const**) in cp_parse.cpp.o
CP_ParseAlienTeam(char const*, char const**) in cp_parse.cpp.o
CL_ParseRanks(char const*, char const**) in cp_rank.cpp.o
CP_ParseEventTrigger(char const*, char const**) in cp_event.cpp.o
INS_ParseInstallations(char const*, char const**) in cp_installation.cpp.o
...
"INV_GetFilterTypeID(char const*)", referenced from:
BS_FillMarket_f() in cp_market_callbacks.cpp.o
PR_ProductionType_f() in cp_produce_callbacks.cpp.o
"INV_ItemMatchesFilter(objDef_s const*, itemFilterTypes_t)", referenced from:
BS_FillMarket_f() in cp_market_callbacks.cpp.o
PR_ProductionListRightClick_f() in cp_produce_callbacks.cpp.o
PR_ProductionListClick_f() in cp_produce_callbacks.cpp.o
PR_UpdateProductionList(base_s const*) in cp_produce_callbacks.cpp.o
"CL_UpdateCharacterValues(character_s const*)", referenced from:
HOS_EmployeeInit_f() in cp_hospital_callbacks.cpp.o
CP_TEAM_SelectActorByUCN_f() in cp_team_callbacks.cpp.o
CP_TEAM_DeEquipActor_f() in cp_team_callbacks.cpp.o
E_EmployeeSelect(Employee*) in cp_employee_callbacks.cpp.o
"UI_OptionIteratorNextOption(uiOptionIterator_t*)", referenced from:
MSO_UpdateVisibleButtons() in cp_messageoptions_callbacks.cpp.o
"UI_InitOptionIteratorAtIndex(int, uiNode_t*, uiOptionIterator_t*)", referenced from:
MSO_Toggle_f() in cp_messageoptions_callbacks.cpp.o
MSO_UpdateVisibleButtons() in cp_messageoptions_callbacks.cpp.o
"FS_Read(void*, int, qFILE_s*)", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameSaveNameCleanup_f() in cp_save.cpp.o
SAV_GameReadGameComment(int) in cp_save.cpp.o
"Cvar_Get(char const*, char const*, int, char const*)", referenced from:
CP_ChooseMap(mission_s*, float const*) in cp_campaign.cpp.o
"LIST_Add(linkedList_t**, void const*, unsigned long)", referenced from:
aircraft_s& LIST_Add<aircraft_s>(linkedList_t**, aircraft_s const&) in cp_aircraft.cpp.o
mission_s& LIST_Add<mission_s>(linkedList_t**, mission_s const&) in cp_missions.cpp.o
alienBase_s& LIST_Add<alienBase_s>(linkedList_t**, alienBase_s const&) in cp_alienbase.cpp.o
updateCharacter_t& LIST_Add<updateCharacter_t>(linkedList_t**, updateCharacter_t const&) in cp_campaign.cpp.o
Employee& LIST_Add<Employee>(linkedList_t**, Employee const&) in cp_employee.cpp.o
installation_s& LIST_Add<installation_s>(linkedList_t**, installation_s const&) in cp_installation.cpp.o
city_s& LIST_Add<city_s>(linkedList_t**, city_s const&) in cp_nation.cpp.o
...
"FpCurveDn(double, double)", referenced from:
AM_CalculateTeamScores(autoMissionBattle_s*) in cp_auto_mission.cpp.o
AM_DoFight(autoMissionBattle_s*) in cp_auto_mission.cpp.o
"FpCurveUp(double, double)", referenced from:
AM_CalculateTeamScores(autoMissionBattle_s*) in cp_auto_mission.cpp.o
"LIST_Sort(linkedList_t**, int (*)(linkedList_t*, linkedList_t*, void const*), void const*)", referenced from:
CL_DisplayPopupInterceptMission(mission_s*) in cp_popup.cpp.o
CL_DisplayPopupInterceptUFO(aircraft_s*) in cp_popup.cpp.o
"Sys_Error(char const*, ...)", referenced from:
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
BDEF_BaseDefenceMenuUpdate_f() in cp_basedefence_callbacks.cpp.o
CP_ParseAlienTeam(char const*, char const**) in cp_parse.cpp.o
CP_GetEventsByID(char const*) in cp_event.cpp.o
CL_ParseCampaignEvents(char const*, char const**) in cp_event.cpp.o
RS_ParseTechnologies(char const*, char const**) in cp_research.cpp.o
MSO_InitList() in cp_messageoptions_callbacks.cpp.o
...
"_Mem_Free(void*, char const*, int)", referenced from:
AIR_PostLoadInitMissions() in cp_aircraft.cpp.o
CP_CreateBattleParameters(mission_s*, battleParam_s*, aircraft_s const*) in cp_missions.cpp.o
AM_DestroyUnitChr(autoUnit_s*) in cp_auto_mission.cpp.o
GEO_Shutdown() in cp_geoscape.cpp.o
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"dbuffer::dbuffer(int)", referenced from:
GAME_CP_InitializeBattlescape(linkedList_t const*) in cp_cgame_callbacks.cpp.o
"_air_slot_type_strings", referenced from:
AIR_ParseAircraft(char const*, char const**, bool) in cp_aircraft.cpp.o
"_compress", referenced from:
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"_compressBound", referenced from:
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"_csi", referenced from:
CP_CleanupTeam(base_s*, equipDef_s*) in cp_team.cpp.o
CP_CleanupAircraftTeam(aircraft_s*, equipDef_s*) in cp_team.cpp.o
CP_CleanTempInventory(base_s*) in cp_team.cpp.o
CP_ChooseMap(mission_s*, float const*) in cp_campaign.cpp.o
CP_SaveMapDefStatXML(mxml_node_s*) in cp_campaign.cpp.o
CP_ResetCampaignData() in cp_campaign.cpp.o
NAT_ScriptSanityCheck() in cp_nation.cpp.o
...
"_developer", referenced from:
MS_LoadXML(mxml_node_s*) in cp_messages.cpp.o
"_libintl_gettext", referenced from:
_gettext in cp_aircraft.cpp.o
_gettext in cp_aircraft_callbacks.cpp.o
_gettext in cp_base.cpp.o
_gettext in cp_base_callbacks.cpp.o
_gettext in cp_basedefence_callbacks.cpp.o
_gettext in cp_cgame_callbacks.cpp.o
_gettext in cp_hospital_callbacks.cpp.o
...
"_libintl_ngettext", referenced from:
_ngettext in cp_base.cpp.o
_ngettext in cp_base_callbacks.cpp.o
_ngettext in cp_cgame_callbacks.cpp.o
_ngettext in cp_employee.cpp.o
_ngettext in cp_installation_callbacks.cpp.o
_ngettext in cp_nation.cpp.o
_ngettext in cp_ufopedia.cpp.o
...
"_mxmlDelete", referenced from:
CP_LoadXML(mxml_node_s*) in cp_campaign.cpp.o
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
STATS_LoadXML(mxml_node_s*) in cp_statistics.cpp.o
"_mxmlNewXML", referenced from:
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"_mxmlSaveString", referenced from:
SAV_GameSave(char const*, char const*, char**) in cp_save.cpp.o
"_uncompress", referenced from:
SAV_GameLoad(char const*, char const**) in cp_save.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [base/cgame-campaign.dylib] Error 1
--- End code ---
Can anyone please help me with this?
To mee it looks like the linker needs some help finding the 64 bit versions of a lot of libraries, but I really don't know how to fix this..
DarkRain:
Hi,
Could you try running configure with the --enable-hardlinkedcgame option before recompiling?
pete:
Thanks!! That worked! Now the game plays.
DarkRain:
Glad to hear it's working now.
For those who might be wondering: This is a known issue, the cgame-campaign module doesn't link as a library (still WIP), but usually the hard linked cgame option is enabled by default, seems the mac makefiles might need adjustment.
Navigation
[0] Message Index
Go to full version