[SDK Compiling Problem] Unresolved external symbols?

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
How do I fix this? I'll try and provide more details if needed...

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
CvSelectionGroup.cpp
CvSelectionGroupAI.cpp
CvStructs.cpp
CvTalkingHeadMessage.cpp
CvTeam.cpp
CvTeamAI.cpp
CvUnit.cpp
CvUnitAI.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCity.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGame.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
CyUnit.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
Linking dynamic library: ..\Warlords\Assets\CvGameCoreDLL.dll
   Creating library ..\Warlords\Assets\CvGameCoreDLL.lib and object ..\Warlords\Assets\CvGameCoreDLL.exp
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)
..\Warlords\Assets\CvGameCoreDLL.dll : fatal error LNK1120: 10 unresolved externals
Process terminated with status 1 (4 minutes, 16 seconds)
17 errors, 0 warnings
 
Unresolved symbols typically mean that there are function in the header file (the .h file) that are trying to be called somewhere that there is no corresponding implementation in the .cpp file. Search the project for the functions that it says are missing, and if you can't find them, then there's your problem. :p

You should be searching for, for example...

CvExtraSaveData::restorePlotValues

Also, I'm not sure if Dale used additional files (adding a new file instead of just modifying the old ones), but if he did you'll probably have to add that file to your project if the program you're developing with warrants it.
 
Bah... this sucks. I have no idea what I'm looking at! Those error messages are useless to me because they don't even tell me which .h or .cpp file has the error!

Sorry, I tried looking for the problem for about an hour, and I about give up.
 
You should be searching for, for example...

CvExtraSaveData::restorePlotValues

Ok, after a nights rest I'm looking into this again.

I did a search for the above bolded code, and the only place I found that is in CvExtraSaveData.cpp.

Now, what is it I'm supposed to do now that I've located it? That's what I'm not sure of. :sad:







** EDIT **

Interesting...

There is a CvExtraSaveData.cpp in the Better AI SDK files, but not one with the regular 2.08 SDK files. Could this have something to do with my problem? And if so, how do I resolve it?
 
** EDIT **

Interesting...

There is a CvExtraSaveData.cpp in the Better AI SDK files, but not one with the regular 2.08 SDK files. Could this have something to do with my problem? And if so, how do I resolve it?

It's completely legitimate that the Better AI files created entirely new files for the SDK, which seems to be the case in this situation.

What are you using to compile the code?
 
It's completely legitimate that the Better AI files created entirely new files for the SDK, which seems to be the case in this situation.

What are you using to compile the code?


I'm using CodeBlocks... following Kael's tutorial.
 
I'm using CodeBlocks... following Kael's tutorial.

Ok. I'm not sure how codeblocks work, maybe someone else does, but in Visual Studio, for example, you need to add the new files to the project. By default, only the default Civ4 files are part of the project, and even if the new files are in the same directory, the compiler won't look at them if they're not part of the project.
 
Now that you mention it, I don't think it is compiling the CvExtraSaveData files. They're not showing up in the log. Weird...


So how do I add the files?
 
Ok. I'm not sure how codeblocks work, maybe someone else does, but in Visual Studio, for example, you need to add the new files to the project. By default, only the default Civ4 files are part of the project, and even if the new files are in the same directory, the compiler won't look at them if they're not part of the project.


YES!!!!!!!!!!
:woohoo:

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
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvExtraSaveData.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
CvGameCoreUtils.cpp
CvGameTextMgr.cpp
CvGlobals.cpp
CvHallOfFameInfo.cpp
CvInfoWater.cpp
CvInfos.cpp
CvInitCore.cpp
CvMap.cpp
CvMapGenerator.cpp
CvPlayer.cpp
CvPlayer.cpp(6373) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
CvPlayerAI.cpp
CvPlot.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
CvUnitAI.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCity.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGame.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
CyUnit.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
Linking dynamic library: ..\Warlords\Assets\CvGameCoreDLL.dll
   Creating library ..\Warlords\Assets\CvGameCoreDLL.lib and object ..\Warlords\Assets\CvGameCoreDLL.exp
Process terminated with status 0 (6 minutes, 20 seconds)
0 errors, 1 warnings



I got it working! You were right. In the .cpb I had to manually add the CvExtraSaveData.cpp and CvExtraSaveData.h files to the listing.

I can't believe it was THAT easy to fix.




Gerikes, you have no idea how grateful I am. I've been going insane over the past month how to figure this out, and you did it. THANK YOU!!!!

:goodjob: :worship:


Time to get to work...
 
How do you rectify this problem if you are using Visual C++ 2005 Express Edition?

EDIT: I dont know how to use Visual C++ so what I am asking is how do I add these files in so the build compiles as I tried adding them via the Project > Add Existing File... menu but that does nothing :(
 
How do you rectify this problem if you are using Visual C++ 2005 Express Edition?

EDIT: I dont know how to use Visual C++ so what I am asking is how do I add these files in so the build compiles as I tried adding them via the Project > Add Existing File... menu but that does nothing :(

That should be all you need to do. You might want to post what error messages you're getting.
 
I am compiling the BetterAI 12 source code.

Code:
1>------ Build started: Project: CvGameCoreDLL, Configuration: Final_Release Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1> "C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe" /dll /nologo  /LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ /LIBPATH:"C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:/Program Files/Microsoft Platform SDK/Lib" /out:Final_Release/CvGameCoreDLL.dll  boost_python-vc71-mt-1_32.lib winmm.lib user32.lib  Final_Release/CvArea.obj Final_Release/CvArtFileMgr.obj Final_Release/CvCity.obj Final_Release/CvCityAI.obj Final_Release/CvDLLButtonPopup.obj Final_Release/CvDLLEntity.obj Final_Release/CvDLLPython.obj Final_Release/CvDLLWidgetData.obj Final_Release/CvDeal.obj Final_Release/CvDiploParameters.obj Final_Release/CvFractal.obj Final_Release/CvGame.obj Final_Release/CvGameAI.obj Final_Release/CvGameCoreDLL.obj Final_Release/CvGameCoreUtils.obj Final_Release/CvGameTextMgr.obj Final_Release/CvGlobals.obj Final_Release/CvHallOfFameInfo.obj Final_Release/CvInfoWater.obj Final_Release/CvInfos.obj Final_Release/CvInitCore.obj Final_Release/CvMap.obj Final_Release/CvMapGenerator.obj Final_Release/CvPlayer.obj Final_Release/CvPlayerAI.obj Final_Release/CvPlot.obj Final_Release/CvPlotGroup.obj Final_Release/CvPopupInfo.obj Final_Release/CvPopupReturn.obj Final_Release/CvRandom.obj Final_Release/CvReplayInfo.obj Final_Release/CvReplayMessage.obj Final_Release/CvSelectionGroup.obj Final_Release/CvSelectionGroupAI.obj Final_Release/CvStructs.obj Final_Release/CvTalkingHeadMessage.obj Final_Release/CvTeam.obj Final_Release/CvTeamAI.obj Final_Release/CvUnit.obj Final_Release/CvUnitAI.obj Final_Release/CvXMLLoadUtility.obj Final_Release/CvXMLLoadUtilityGet.obj Final_Release/CvXMLLoadUtilityInit.obj Final_Release/CvXMLLoadUtilitySet.obj Final_Release/CyArea.obj Final_Release/CyAreaInterface.obj Final_Release/CyArgsList.obj Final_Release/CyArtFileMgr.obj Final_Release/CyArtFileMgrInterface.obj Final_Release/CyCity.obj Final_Release/CyCityInterface1.obj Final_Release/CyDeal.obj Final_Release/CyEnumsInterface.obj Final_Release/CyGame.obj Final_Release/CyGameCoreUtils.obj Final_Release/CyGameCoreUtilsInterface.obj Final_Release/CyGameInterface.obj Final_Release/CyGameTextMgr.obj Final_Release/CyGameTextMgrInterface.obj Final_Release/CyGlobalContext.obj Final_Release/CyGlobalContextInterface1.obj Final_Release/CyGlobalContextInterface2.obj Final_Release/CyGlobalContextInterface3.obj Final_Release/CyGlobalContextInterface4.obj Final_Release/CyHallOfFameInfo.obj Final_Release/CyHallOfFameInterface.obj Final_Release/CyInfoInterface1.obj Final_Release/CyInfoInterface2.obj Final_Release/CyInfoInterface3.obj Final_Release/CyMap.obj Final_Release/CyMapGenerator.obj Final_Release/CyMapGeneratorInterface.obj Final_Release/CyMapInterface.obj Final_Release/CyPlayer.obj Final_Release/CyPlayerInterface1.obj Final_Release/CyPlot.obj Final_Release/CyPlotInterface1.obj Final_Release/CyRandomInterface.obj Final_Release/CyReplayInfo.obj Final_Release/CySelectionGroup.obj Final_Release/CySelectionGroupInterface.obj Final_Release/CyStructsInterface1.obj Final_Release/CyTeam.obj Final_Release/CyTeamInterface.obj Final_Release/CyUnit.obj Final_Release/CyUnitInterface1.obj Final_Release/FAssert.obj Final_Release/FDialogTemplate.obj Final_Release/_precompile.obj   /debug /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF 
1>   Creating library Final_Release/CvGameCoreDLL.lib and object Final_Release/CvGameCoreDLL.exp
1>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)
1>CvMap.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
1>CvPlayerAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
1>CvTeamAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::getSaveData(enum ExtraSaveDataType,int,int,int,int &)" (?getSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHAAH@Z)
1>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)
1>CvMap.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
1>CvPlayerAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
1>CvTeamAI.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CvExtraSaveData::setSaveData(enum ExtraSaveDataType,int,int,int,int)" (?setSaveData@CvExtraSaveData@@QAE_NW4ExtraSaveDataType@@HHHH@Z)
1>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)
1>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)
1>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)
1>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)
1>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)
1>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)
1>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)
1>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)
1>Final_Release/CvGameCoreDLL.dll : fatal error LNK1120: 10 unresolved externals
1>NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Games\Civ 4\Warlords\Mods\DLLMod\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
I added the CvExtraSaveData.cpp and CvExtraSaveData.h files to the .cpb file but that did not solve my problem.

I could not get codeblocks to work for me so that is why I am using Visual C++ Express Edition. If anyone could help it would be greatly appreciated.

Thanks.
 
I tried compiling the DLL in CodeBlocks this time and this is the error I now get. Can someone please advise what I am doing wrong :(

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Civ 4\Warlords\Mods\BetterAI\Source C++\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvExtraSaveData.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
CvGameCoreUtils.cpp
CvGameTextMgr.cpp
CvGlobals.cpp
CvHallOfFameInfo.cpp
CvInfoWater.cpp
CvInfos.cpp
CvInitCore.cpp
CvMap.cpp
CvMapGenerator.cpp
CvPlayer.cpp
CvPlayerAI.cpp
CvPlot.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
CvUnitAI.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCity.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGame.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
CyUnit.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
Linking dynamic library: ..\Warlords\Assets\CvGameCoreDLL.dll
LINK : fatal error LNK1181: cannot open input file 'winmm.lib'
Process terminated with status 1 (12 minutes, 8 seconds)
1 errors, 0 warnings
 
Can anyone assist me with my problem now that I am using codeblocks?
 
There must one of you that uses Codeblocks that can point out what I am doing wrong. I really need your help to figure this out as its an obstacle to me learning how to mod the SDK.

Please provide some assistance if you can :please:
 
Linking dynamic library: ..\Warlords\Assets\CvGameCoreDLL.dll
LINK : fatal error LNK1181: cannot open input file 'winmm.lib'
Process terminated with status 1 (12 minutes, 8 seconds)
1 errors, 0 warnings
[/CODE]



Looks like your problem is that LNK error. I believe a few people ran into this in the stickied SDK thread.

http://forums.civfanatics.com/showthread.php?t=166933

The problem seemed to be that either the Platform SDK wasn't installed, or Codeblocks wasn't pointing the right directory where the SDK was installed.
 
Top Bottom