Having problems compiling Better AI SDK...

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
I'm having problems meging Better AI with a few 2.08 compatable mods. Everything seems to compile fine until the very end, then this comes up...

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization 4\Warlords\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvArea.cpp
CvArtFileMgr.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvFractal.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
CvGameCoreUtils.cpp
CvGameTextMgr.cpp
CvGlobals.cpp
CvHallOfFameInfo.cpp
CvInfoWater.cpp
CvInitCore.cpp
CvMap.cpp
CvMapGenerator.cpp
CvPlayerAI.cpp
CvPlotGroup.cpp
CvPopupInfo.cpp
CvPopupReturn.cpp
CvRandom.cpp
CvReplayInfo.cpp
CvReplayMessage.cpp
CvSelectionGroup.cpp
CvSelectionGroupAI.cpp
CvStructs.cpp
CvTalkingHeadMessage.cpp
CvTeam.cpp
CvTeamAI.cpp
CvUnit.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGameCoreUtils.cpp
CyGameCoreUtilsInterface.cpp
CyGameInterface.cpp
CyGameTextMgr.cpp
CyGameTextMgrInterface.cpp
CyGlobalContext.cpp
CyGlobalContextInterface1.cpp
CyGlobalContextInterface2.cpp
CyGlobalContextInterface3.cpp
CyGlobalContextInterface4.cpp
CyHallOfFameInfo.cpp
CyHallOfFameInterface.cpp
CyInfoInterface1.cpp
CyInfoInterface2.cpp
CyInfoInterface3.cpp
CyMap.cpp
CyMapGenerator.cpp
CyMapGeneratorInterface.cpp
CyMapInterface.cpp
CyPlayer.cpp
CyPlayerInterface1.cpp
CyPlot.cpp
CyPlotInterface1.cpp
CyRandomInterface.cpp
CyReplayInfo.cpp
CySelectionGroup.cpp
CySelectionGroupInterface.cpp
CyStructsInterface1.cpp
CyTeam.cpp
CyTeamInterface.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
cvcity.cpp
cvgame.cpp
cvinfos.cpp
cvplayer.cpp
cvplayer.cpp(6373) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
cvplot.cpp
cvunitai.cpp
cycity.cpp
cygame.cpp
cyunit.cpp
Linking dynamic library: ..\Warlords\Assets\CvGameCoreDLL.dll
   Creating library ..\Warlords\Assets\CvGameCoreDLL.lib and object ..\Warlords\Assets\CvGameCoreDLL.exp
[COLOR="Red"]CvCityAI.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z) referenced in function "public: void __thiscall CvCityAI::read(class FDataStreamBase *)" (?read@CvCityAI@@QAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
CvPlayerAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
CvTeamAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
CvCityAI.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z) referenced in function "protected: void __thiscall CvCityAI::writeExtraSaveData(class CvExtraSaveData &)" (?writeExtraSaveData@CvCityAI@@IAEXAAVCvExtraSaveData@@@Z)
CvMap.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
CvPlayerAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
CvTeamAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::invalidate(void)" (?invalidate@CvExtraSaveData@@QAE_NXZ) referenced in function "public: void __thiscall CvMap::doTurn(void)" (?doTurn@CvMap@@QAEXXZ)
CvMap.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CvExtraSaveData::~CvExtraSaveData(void)" (??1CvExtraSaveData@@UAE@XZ) referenced in function "public: virtual __thiscall CvMap::~CvMap(void)" (??1CvMap@@UAE@XZ)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::cleanPlotValues(class CvMap &)" (?cleanPlotValues@CvExtraSaveData@@QAE_NAAVCvMap@@@Z) referenced in function "public: virtual void __thiscall CvMap::read(class FDataStreamBase *)" (?read@CvMap@@UAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setupForRead(class CvMap &)" (?setupForRead@CvExtraSaveData@@QAE_NAAVCvMap@@@Z) referenced in function "public: virtual void __thiscall CvMap::read(class FDataStreamBase *)" (?read@CvMap@@UAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::restorePlotValues(class CvMap &)" (?restorePlotValues@CvExtraSaveData@@QAE_NAAVCvMap@@@Z) referenced in function "public: virtual void __thiscall CvMap::write(class FDataStreamBase *)" (?write@CvMap@@UAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::writeToPlots(class CvMap &)" (?writeToPlots@CvExtraSaveData@@QAE_NAAVCvMap@@@Z) referenced in function "public: virtual void __thiscall CvMap::write(class FDataStreamBase *)" (?write@CvMap@@UAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setupForWrite(class CvMap &)" (?setupForWrite@CvExtraSaveData@@QAE_NAAVCvMap@@@Z) referenced in function "public: virtual void __thiscall CvMap::write(class FDataStreamBase *)" (?write@CvMap@@UAEXPAVFDataStreamBase@@@Z)
CvMap.obj : error LNK2019: unresolved external symbol "public: __thiscall CvExtraSaveData::CvExtraSaveData(void)" (??0CvExtraSaveData@@QAE@XZ) referenced in function "public: __thiscall CvMap::CvMap(void)" (??0CvMap@@QAE@XZ)
cvunitai.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvUnit::getDCMBombard(void)const " (?getDCMBombard@CvUnit@@QBE_NXZ) referenced in function "protected: int __thiscall CvUnitAI::AI_pillageValue(class CvPlot *,int)" (?AI_pillageValue@CvUnitAI@@IAEHPAVCvPlot@@H@Z)
..\Warlords\Assets\CvGameCoreDLL.dll : fatal error LNK1120: 11 unresolved externals[/COLOR]Process terminated with status 1 (6 minutes, 12 seconds)
18 errors, 1 warnings

Any ideas as what I should look into? This only happens with the Better AI SDK files, if I compile with 2.08 SDK files, it's fine.
 
I think that the latest versions of BetterAI have an extra file CvExtraSaveData.cpp or something. This appears to be missing from the list of files that it compiled and probably contains the functions it can't find.

Of course, it doesn't actually do anything at the minute as BetterAI is save compatible with unmodded civ. So no harm should come with removing all references to CvExtraSaveData if you have to.
 
I think that the latest versions of BetterAI have an extra file CvExtraSaveData.cpp or something. This appears to be missing from the list of files that it compiled and probably contains the functions it can't find.

Of course, it doesn't actually do anything at the minute as BetterAI is save compatible with unmodded civ. So no harm should come with removing all references to CvExtraSaveData if you have to.


Yes, it does. I found the CvExtraSaveData.cpp. You're saying it's not really "required" since the Better AI code is backwards compatable with 2.08?
 
I was able to solve the problem. I needed to add the CvExtraSaveData .cpp and .h file to the project file of CodeBlocks. It compiled no problem after that.
 
That file contains the hack we used to remain compatible and still allow us to save some extra info. If I recall correctly, we did not get to the point of actually using this capability, so someone could rip the code out, but it would involve a bit more than just not including that file.

-Iustus
 
Back
Top Bottom