[SDK] Colonization Makefile

Will the makefile provided in the original post work with the last version of Civ4Col (from the date, it seems to have been made before the last patch).

EDIT: I'm getting this error, on CyCityInterface1:

Code:
NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'

EDIT2:

I tried to compile a debug dll with CodeBlocks, and got an error at CyCityInterface as well, but it gives me the same error for which a solution has been provided earlier in the thread (that the file should be split), so I'll try that.
 
Will the makefile provided in the original post work with the last version of Civ4Col (from the date, it seems to have been made before the last patch).

EDIT: I'm getting this error, on CyCityInterface1:

Code:
NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'

It works fine for me with the patch.

I know that you do have to split the Cy*Interface files as done in the makefile download. So you can't just copy the makefile into your working directory, but you must copy all the C++ source files included into your working directory as well. Have you done this?


Although, I did have one issue. The function:

Code:
.def("canSailEurope", &CyUnit::canSailEurope, "bool (int iEurope)")

is not in either CvUnitInterface1.cpp or CvUnitInterface2.cpp. It's used in Python so you will need to add that line to one of the CvUnitInterface files.
 
It works fine for me with the patch.

I know that you do have to split the Cy*Interface files as done in the makefile download. So you can't just copy the makefile into your working directory, but you must copy all the C++ source files included into your working directory as well. Have you done this?

Ops, no. Did that now and it is compiling beyond the point where it had had the error.

Although, I did have one issue. The function:

Code:
.def("canSailEurope", &CyUnit::canSailEurope, "bool (int iEurope)")

is not in either CvUnitInterface1.cpp or CvUnitInterface2.cpp. It's used in Python so you will need to add that line to one of the CvUnitInterface files.

Thanks, did that now.

EDIT: Had another error, because this was included in CyPlayerInterface3:

Code:
		.def("educationThreshold", &CyPlayer::educationThreshold, "int ()")

And, at least in the latest Civ4Col version, educationThreshould isn't a member of CyPlayer. Removed that line and it is now compiling beyond that.
 
New error, but this one I don't know how to solve:

Code:
 "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:Debug\CvGameCoreDLL.dll  msvcprt.lib boost_python-vc71-mt-1_32.lib winmm.lib user32.lib  Debug/CvArea.obj Debug/CvArtFileMgr.obj Debug/CvCity.obj Debug/CvCityAI.obj Debug/CvDLLButtonPopup.obj Debug/CvDLLEntity.obj Debug/CvDLLPython.obj Debug/CvDLLWidgetData.obj Debug/CvDeal.obj Debug/CvDiploParameters.obj Debug/CvFractal.obj Debug/CvGame.obj Debug/CvGameAI.obj Debug/CvGameCoreDLL.obj Debug/CvGameCoreUtils.obj Debug/CvGameTextMgr.obj Debug/CvGlobals.obj Debug/CvHallOfFameInfo.obj Debug/CvInfoWater.obj Debug/CvInfos.obj Debug/CvInitCore.obj Debug/CvMap.obj Debug/CvMapGenerator.obj Debug/CvPlayer.obj Debug/CvPlayerAI.obj Debug/CvPlot.obj Debug/CvPopupInfo.obj Debug/CvPopupReturn.obj Debug/CvRandom.obj Debug/CvReplayInfo.obj Debug/CvReplayMessage.obj Debug/CvSelectionGroup.obj Debug/CvSelectionGroupAI.obj Debug/CvStructs.obj Debug/CvTalkingHeadMessage.obj Debug/CvTeam.obj Debug/CvTeamAI.obj Debug/CvTradeRoute.obj Debug/CvUnit.obj Debug/CvUnitAI.obj Debug/CvXMLLoadUtility.obj Debug/CvXMLLoadUtilityGet.obj Debug/CvXMLLoadUtilityInit.obj Debug/CvXMLLoadUtilitySet.obj Debug/CyArea.obj Debug/CyAreaInterface.obj Debug/CyArgsList.obj Debug/CyArtFileMgr.obj Debug/CyArtFileMgrInterface.obj Debug/CyCity.obj Debug/CyCityInterface1.obj Debug/CyCityInterface2.obj Debug/CyCityInterface3.obj Debug/CyCityInterface4.obj Debug/CyCityInterface5.obj Debug/CyDeal.obj Debug/CyDealInterface.obj Debug/CyEnumsInterface.obj Debug/CyGame.obj Debug/CyGameCoreUtils.obj Debug/CyGameCoreUtilsInterface.obj Debug/CyGameInterface1.obj Debug/CyGameInterface2.obj Debug/CyGameInterface3.obj Debug/CyGameTextMgr.obj Debug/CyGameTextMgrInterface.obj Debug/CyGlobalContext.obj Debug/CyGlobalContextInterface1.obj Debug/CyGlobalContextInterface2.obj Debug/CyGlobalContextInterface3.obj Debug/CyGlobalContextInterface4.obj Debug/CyGlobalContextInterface5.obj Debug/CyGlobalContextInterface6.obj Debug/CyGlobalContextInterface7.obj Debug/CyHallOfFameInfo.obj Debug/CyHallOfFameInterface.obj Debug/CyInfoInterface1.obj Debug/CyInfoInterface2.obj Debug/CyInfoInterface3.obj Debug/CyMap.obj Debug/CyMapGenerator.obj Debug/CyMapGeneratorInterface.obj Debug/CyMapInterface1.obj Debug/CyMapInterface2.obj Debug/CyPlayer.obj Debug/CyPlayerInterface1.obj Debug/CyPlayerInterface2.obj Debug/CyPlayerInterface3.obj Debug/CyPlayerInterface4.obj Debug/CyPlot.obj Debug/CyPlotInterface1.obj Debug/CyPlotInterface2.obj Debug/CyRandomInterface.obj Debug/CyReplayInfo.obj Debug/CySelectionGroup.obj Debug/CySelectionGroupInterface.obj Debug/CyStructsInterface1.obj Debug/CyTeam.obj Debug/CyTeamInterface.obj Debug/CyTradeRoute.obj Debug/CyTradeRouteInterface.obj Debug/CyUnit.obj Debug/CyUnitInterface1.obj Debug/CyUnitInterface2.obj Debug/FAssert.obj Debug/FDialogTemplate.obj Debug/_precompile.obj   /debug /NODEFAULTLIB:msvcprtd.lib /pdb:Debug\CvGameCoreDLL.pdb /INCREMENTAL /SUBSYSTEM:WINDOWS 
   Creating library Debug\CvGameCoreDLL.lib and object Debug\CvGameCoreDLL.exp
CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyMapPythonInterface(void)" (?CyMapPythonInterface@@YAXXZ) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyGamePythonInterface(void)" (?CyGamePythonInterface@@YAXXZ) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
Debug\CvGameCoreDLL.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
Stop.

EDIT: Apparently the clean_Debug command wasn't working, so I had to clean it manually. Then it worked! Fully compiled now :D
 
I created new functions and exposed them to python. That made the debug version no longer compile, so it seems I need to split the PlayerInterface and PlotInterface further. How would I proceed to do that?

Your problems will probably be solved by switching to use this makefile instead.

It's much faster, and was rebuilt by DannyDaemonic so it doesn't need to be Civ-version specific.

It also seems to negate the problems with needing to split files.
 
Back
Top Bottom