A simple guide to compiling the DLL

I added new sections for this tutorial: Working with Visual Studio and Debugging (see links in the opening post).

In addition I made a change to the project file to allow the make command to show errors from several source files, and not to stop after only one has failed to compile.

The archive with the makefile and project file in the downloads section has been updated, but I attach here the project file by itself in case someone already has everything set up and doesn't wish to re-download things.
 

Attachments

Tried this as suggested in the thread I had started. Nothing worked at all.

Attempts at producing a debug DLL fail completely. errors below:

Spoiler :

1>------ Build started: Project: CvGameCoreDLL, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>NMAKE : warning U4010: 'CvArea.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvArea.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvArtFileMgr.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvArtFileMgr.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvCity.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvCity.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvCityAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvCityAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDeal.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDeal.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDiploParameters.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDiploParameters.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLButtonPopup.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLButtonPopup.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLEntity.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLEntity.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLPython.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLPython.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLPythonEvents.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLPythonEvents.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLTranslator.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLTranslator.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvDLLWidgetData.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvDLLWidgetData.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvEventReporter.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvEventReporter.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvFractal.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvFractal.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGame.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGame.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGameAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGameAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGameCoreDLL.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGameCoreDLL.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGameCoreUtils.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGameCoreUtils.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGameInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGameInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGameTextMgr.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGameTextMgr.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvGlobals.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvGlobals.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvHallOfFameInfo.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvHallOfFameInfo.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvInfoWater.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvInfoWater.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvInfos.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvInfos.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvInitCore.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvInitCore.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvMap.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvMap.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvMapGenerator.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvMapGenerator.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvMessageControl.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvMessageControl.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvMessageData.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvMessageData.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPlayer.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPlayer.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPlayerAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPlayerAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPlot.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPlot.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPlotGroup.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPlotGroup.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPopupInfo.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPopupInfo.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvPopupReturn.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvPopupReturn.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvRandom.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvRandom.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvReplayInfo.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvReplayInfo.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvReplayMessage.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvReplayMessage.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvSelectionGroup.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvSelectionGroup.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvSelectionGroupAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvSelectionGroupAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvStatistics.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvStatistics.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvStructs.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvStructs.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvTalkingHeadMessage.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvTalkingHeadMessage.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvTeam.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvTeam.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvTeamAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvTeamAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvUnit.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvUnit.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvUnitAI.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvUnitAI.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvXMLLoadUtility.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvXMLLoadUtility.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvXMLLoadUtilityGet.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvXMLLoadUtilityGet.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvXMLLoadUtilityInit.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvXMLLoadUtilityInit.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CvXMLLoadUtilitySet.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CvXMLLoadUtilitySet.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyArea.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyArea.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyAreaInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyAreaInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyArgsList.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyArgsList.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyArtFileMgr.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyArtFileMgr.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyArtFileMgrInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyArtFileMgrInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyCity.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyCity.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyCityInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyCityInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyDeal.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyDeal.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyEnumsInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyEnumsInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGame.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGame.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGameCoreUtils.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGameCoreUtils.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGameCoreUtilsInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGameCoreUtilsInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGameInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGameInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGameTextMgr.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGameTextMgr.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGameTextMgrInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGameTextMgrInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGlobalContext.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGlobalContext.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGlobalContextInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGlobalContextInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGlobalContextInterface2.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGlobalContextInterface2.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGlobalContextInterface3.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGlobalContextInterface3.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyGlobalContextInterface4.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyGlobalContextInterface4.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyHallOfFameInfo.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyHallOfFameInfo.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyHallOfFameInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyHallOfFameInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyInfoInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyInfoInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyInfoInterface2.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyInfoInterface2.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyInfoInterface3.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyInfoInterface3.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMap.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMap.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMapGenerator.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMapGenerator.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMapGeneratorInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMapGeneratorInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMapInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMapInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMessageControl.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMessageControl.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyMessageControlInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyMessageControlInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyPlayer.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyPlayer.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyPlayerInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyPlayerInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyPlayerInterface2.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyPlayerInterface2.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyPlot.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyPlot.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyPlotInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyPlotInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyRandomInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyRandomInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyReplayInfo.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyReplayInfo.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CySelectionGroup.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CySelectionGroup.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CySelectionGroupInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CySelectionGroupInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyStructsInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyStructsInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyTeam.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyTeam.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyTeamInterface.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyTeamInterface.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyUnit.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyUnit.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'CyUnitInterface1.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/CyUnitInterface1.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'FAssert.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/FAssert.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: 'FDialogTemplate.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/FDialogTemplate.obj' : not all dependents available; target not built
1>NMAKE : warning U4010: '_precompile.cpp' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug/_precompile.obj' : not all dependents available; target not built
1>NMAKE : warning U4011: 'Debug\CvGameCoreDLL.dll' : not all dependents available; target not built
1>NMAKE : warning U4011: 'Debug' : not all dependents available; target not built
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\Dillon\FfH Mods\DLL folder\DLL Working File\Debug\BuildLog.htm"
1>CvGameCoreDLL - 1 error(s), 200 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



The attempts to build a release supposedly succeed, (the program spits out a "1 succeeded, 0 failed" line), but the actual CvGameCoreDLL is nowhere to be seen in any nearby folders. It also seems to take a lot less time than successful compilations on a previous computer. (Happens in seconds or so), which is really quick compared to the previous computer (which was less powerful, but took several minutes, and that speed increase seems way too much.)
 
Regarding the release configuration - it obviously didn't compile, since a few seconds is definitely less then it should take.
In your debug build output I don't see an actual error of what went wrong.

Do you use VS2008? Do you use the project and makefile attached in the tutorial? Did you update the paths in the makefile properly?
 
Yes, I've done it using just the stuff you linked. This includes getting your version of the Windows SDK, though a different one had been recommended for Windows 7.), Same errors are occurring, even with several adjustments to the makefile information.

Edit: Do you know if Windows 7 might be doing anything? (Assuming you don't find anything, it's always possible that there's some typo in something I had written in for some of these files, though it is useful to eliminate other possibilities.)
 
It worked for at least one other person on Windows 7...

The windows SDK needs to be compatible with the version with which the exe was compiled.

Can you attach the makefile and project file after you've updated the paths?
 
When you compile the project it uses the makefile in the same folder as the project. The makefile there is the old makefile which is not compatible with the project.
You downloaded my makefile into the CvGameCoreDLL folder. The project does not look for it there.
Copy it to the project folder (override the existing makefile), and it should be fine.

Note that all the source files (*.cpp, *.h, *.inl., *.rc) must be in the same folder as both the VS project file and the make file.
 
I thought I had done that, but it turns out the file hadn't actually been saved over. Getting it saved fixed the one issue, although now I'm stuck on something else.

Spoiler :

1>------ Build started: Project: CvGameCoreDLL, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>File Not Found
1>File Not Found
1>"fastdep.exe" NOT FOUND!
1>Please edit Makefile to reflect the correct path of fastdep.
1> "C:\Program Files(x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /Od /D_DEBUG /RTC1 /Fp"Debug\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files(x86)\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files(x86)\WindowsSDK/Include" /I"C:\Program Files(x86)\WindowsSDK/Include/mfc" /I"C:\Program Files(x86)\2K Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files(x86)\2K Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Debug\_precompile.obj" /c _precompile.cpp
1>'C:\Program' is not recognized as an internal or external command,
1>operable program or batch file.
1>NMAKE : warning U4010: 'Debug\CvGameCoreDLL.pch' : build failed; /K specified, continuing ...
1> "C:\Program Files(x86)\Microsoft Visual C++ Toolkit 2003\bin\link.exe" /out:Debug\CvGameCoreDLL.dll /INCREMENTAL /DEBUG /PDB:"Debug\CvGameCoreDLL.pdb" /IMPLIB:"Debug\CvGameCoreDLL.lib" /DLL /NOLOGO /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /TLBID:1 /LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ boost_python-vc71-mt-1_32.lib /LIBPATH:"C:\Program Files(x86)\Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:\Program Files(x86)\WindowsSDK/Lib" /LIBPATH:"C:\Program Files(x86)\2K Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/libs" /LIBPATH:"C:\Program Files(x86)\2K Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\Python24/libs" winmm.lib user32.lib msvcprt.lib
1>'C:\Program' is not recognized as an internal or external command,
1>operable program or batch file.
1>NMAKE : warning U4010: 'Debug\CvGameCoreDLL.dll' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Debug' : not all dependents available; target not built
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\Dillon\FfH Mods\DLL folder\DLL Working File\Debug\BuildLog.htm"
1>CvGameCoreDLL - 1 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Makefile changes are written out here (Probably another typo or odd bit of syntax, but I do\id go back and fix a few, copy/pasted the actual program directories, and checked that the apparent files were actually there, so it may be somewhat subtle.):

Spoiler :

TOOLKIT=C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003
PSDK=C:\Program Files (x86)\WindowsSDK
CIVINSTALL=C:\Program Files(x86)\2K Games\Sid Meier's Civilization IV\Beyond the Sword
GLOBALBOOST=$(CIVINSTALL)\CvGameCoreDLL\Boost-1.32.0
GLOBALPYTHON=$(CIVINSTALL)\CvGameCoreDLL\Python24
## Uncomment to have newly compiled dlls copied to your mod's Assets directory
#YOURMOD=$(CIVINSTALL)\Mods\MyMod
 
Well, first I see you're missing the bin folder and the fastdep.exe utility in it. The bin folder should be in the same folder as the makefile (it is used for calculating dependencies between .cpp and .h files).

And second, it seems that the path defined for the tool kit is not correct (it cannot find cl.exe in there) - is it C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003?

Make sure you don't have another folder named 'Microsoft Visual C++ Toolkit 2003' inside it. You should have there folders such as bin, include, etc.
Same goes for the Windows SDK - make sure you don't have another WindowSDK folder inside it.
 
It's mostly working now, the fastdep fixed things. (Naturally enough, I've run into another problem when building a debug version, but it's one I've found some possible solutions ot by searching, and may not apply much to this thread.) Thanks for the help.
 
Finally I came to the point of wanting to change some of the C++ sources ... :D

Congratulations, Asaf, your up to date tutorial looks cute (read clear and effective) and is really helpful!

Looking forward to receive nevertheless some error messages soon (hey, the last compiler I installed myself was MS-C5.1 under MS-DOS6.0 :eek:), but what is that?? 2008-Visual-CPP wants a 'Web-Setup', uhhmm, I LOVE nosy installations ... (1 of the reasons why I 'prefer' CIV5 over CIV4 BTW :lol:)

Seriously, is there a way to make this happen without publishing all my computer intimate dates (MACaddress etc.) to Scientology, Darth Vader or whomever wants to use them against me? ... ("But I don't like spam!") ...

[edit: I mean a REAL download, not a downloaded invitation to connect]
 
I did some searching and I found this interesting link.

I followed the first few steps and got this download link.

Haven't tried installing it myself, but it seems promising (and I'm not sure the bootstrapper actually sends private information, but to which his own).

Let me know if it works, and if it does I'll update the guide with it.
 
Thanks a lot, Asaf, You are great! :goodjob:(I had done also some searching, but found only the _whole_ package as ISO image, which is bigger than a CD ... while it really needs just 60MB)
I'm not sure the bootstrapper actually sends private information
Me too!!! But last year street view (not really unexpectable as google++), now apple ... and "software errors" all the time ... bad, bad computers, why do you do such things to us:rolleyes: It is easy to become paranoid these days, as the rest risks seem to grow steadily ie. "the experts": this was completely unexpected. :p

Now I have on the Target PC an unfinished 'Standard'-Installation, (the WebSetup stopped at the point where it detected, that this PC has NO internet connection) with an icon on the desktop (for Setup continuation after establishing connection) and maybe(?) some changes in the registry.
Would you try to "uninstall"/remove/cleanup those (if yes, how?) or just ignore it and simply start the OfflineSetup?
 
I actually trust MS much more than I trust other software companies with regards to personal information and privacy...

Try starting the offline installation and see how it goes. You can always uninstall it later.
But try following the instructions on the first link I gave you.

Note that you still need to activate it to use it more than 30 days (although there's a tip in the first post on a possible bypass).
 
(OS: Windows 7)
Following your link I downloaded ixpvc.exe and extracted from it with 7z to a temp dir those files:
Code:
31.07.2008  16:01        58.622.665 vs_setup.cab
31.07.2008  16:02         3.956.224 vs_setup.msi
Opened a DOS-window, went to mentioned temp dir and gave this command:
msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress

All went well, no interference with the aborted WebSetup, no problems at all, the same with the subsequent steps ... YOUR GUIDE IS PURE GOLD! :goodjob: Great Job!!!

One question though: as the whole comes "out of the box" there seems to be no difference between 'Build and New Build CvGameCoreDLL' (erstellen / neu erstellen) - all .obj files are compiled every time. I would expect the normal Build uses the already existing objects from the untouched sources. How can I make that?

[[[minor notes on The solution explorer:
[... all .cpp files are in the 'Source Files' folder, and all .h files are in the 'Header Files' folder ...] that's useful, but _not default_. Btw, can it be configurated to show up chronological (reversed) instead of alphabetic?

[... Note that the list of files here does not influence the actual compilation, since this is done using the makefile...] Sure this is done using the makefile ... but amazingly simple this makefile is in turn influenced by the list of files here ... {I overwrote the sources from your 'Step 6: Add the source files' with the changed sources from jdog5000's BBAIv1.01, didn't 'waste' any thoughts on the "unknown" BetterBTSAI.h & BetterBTSAI.cpp, just compiled, started CIV ... and it worked!!! Later I asked "why"? And really: BetterBTSAI.obj was there, without any action ... cool}{On the other hand this means, one cannot just make a save copy eg. CvSelectionGroup_org.cpp and (test)edit CvSelectionGroup.cpp ... the magic makefile "sees" and uses _both_ and of course I got LOTSOF errors, ohmygod, what the hell is going on, I just changed a few lines ...:D}

[... if you use a mod's code and this mod has files which are not in the original BTS source folder, you will not see these files in the solution explorer ...] without any action I _see them_ (marked with little red minus signs, rightclick on them -> add to project)
]]]

.

In the meantime I found out, that even if the game hangs in an 'infinite loop' of C++ code (release version), you can jump out ___with Python___ using again(!) simply key strokes - of course, again(!) the screen is frozen, but keyboard for input & PythonDbg.log for output works great. More in the BBAI subforum.

I like the IDE and it was a good occassion to upgrade from a 24 year old DOS compiler :D ... was the best Mickeysoft product ever! (runner-up is the original MS-Mouse, which costed then about $100/160DM ... Really!!)
Btw, I don't mind to register. I think that is part of the deal. Still for me it feels comfortable to be able to install VC++2008Exp from memostick whenever I want, harddisk headcrash, new computer, whatever ... even in several years when MS discontinued long ago its download ... just reinstall and use an acquainted tool ...
 
(OS: Windows 7)
Following your link I downloaded ixpvc.exe and extracted from it with 7z to a temp dir those files:
Code:
31.07.2008  16:01        58.622.665 vs_setup.cab
31.07.2008  16:02         3.956.224 vs_setup.msi
Opened a DOS-window, went to mentioned temp dir and gave this command:
msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress

All went well, no interference with the aborted WebSetup, no problems at all, the same with the subsequent steps ... YOUR GUIDE IS PURE GOLD! :goodjob: Great Job!!!

Great! Guide updated. Thanks for testing it.

One question though: as the whole comes "out of the box" there seems to be no difference between 'Build and New Build CvGameCoreDLL' (erstellen / neu erstellen) - all .obj files are compiled every time. I would expect the normal Build uses the already existing objects from the untouched sources. How can I make that?

When you haven't built anything yet, they're the same.
After that - it should only build objects for which the sources have changed (or touched, actually). The make command (and makefile) should take care of that.
As for header dependency (through the #include in the code) - that's the job of the fastdep utility.
In this specific code, if you touch a header file you usually touch almost all the objects (because of the "spaghetti" include dependencies). Maybe that's what happened?
It should work with this makefile, anyway.

[[[minor notes on The solution explorer:
[... all .cpp files are in the 'Source Files' folder, and all .h files are in the 'Header Files' folder ...] that's useful, but _not default_.

What do you mean 'not default'?

Btw, can it be configurated to show up chronological (reversed) instead of alphabetic?

:dunno:

[... Note that the list of files here does not influence the actual compilation, since this is done using the makefile...] Sure this is done using the makefile ... but amazingly simple this makefile is in turn influenced by the list of files here ... {I overwrote the sources from your 'Step 6: Add the source files' with the changed sources from jdog5000's BBAIv1.01, didn't 'waste' any thoughts on the "unknown" BetterBTSAI.h & BetterBTSAI.cpp, just compiled, started CIV ... and it worked!!! Later I asked "why"? And really: BetterBTSAI.obj was there, without any action ... cool}{On the other hand this means, one cannot just make a save copy eg. CvSelectionGroup_org.cpp and (test)edit CvSelectionGroup.cpp ... the magic makefile "sees" and uses _both_ and of course I got LOTSOF errors, ohmygod, what the hell is going on, I just changed a few lines ...:D}

You could actually run the make command (nmake.exe) yourself without the project. This is what this project is configured to do (see the project properties).
In the makefile you have this section:
Spoiler :
Code:
!IF [ECHO SOURCES= \> sources.mk] == 0 && \
    [FOR %i IN (*.cpp) DO @ECHO. "%i" \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0 && \
    [ECHO Debug_OBJS= \>> sources.mk] == 0 && \
    [FOR /F "delims=." %i IN ('dir /b *.cpp') DO @ECHO. Debug\%i.obj \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0 && \
    [ECHO Release_OBJS= \>> sources.mk] == 0 && \
    [FOR /F "delims=." %i IN ('dir /b *.cpp') DO @ECHO. Release\%i.obj \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0
!INCLUDE sources.mk
!IF [DEL sources.mk]
!ENDIF
!ENDIF

which Danny Daemonic wrote, which adds all cpp files in the folder to the compilation.
And yes, I've had the same problems (especially if you have a space in the file name - 'copy of blabla.cpp'), but since I use version control I rarely make such copies of a file for backup.

[... if you use a mod's code and this mod has files which are not in the original BTS source folder, you will not see these files in the solution explorer ...] without any action I _see them_ (marked with little red minus signs, rightclick on them -> add to project)
]]]

Nice. Didn't know about that one.
 
"all .obj files are compiled every time"
When you haven't built anything yet, they're the same.
:) in this case you have NONE .obj ... so this is to be expected.
After that - it should only build objects for which the sources have changed (or touched, actually). The make command (and makefile) should take care of that.
Yes, 100%! ... it should only build objects [...] which sources touched .../... make [...] should take care of that ...
They SHOULD do, but do NOT. Thus my question
As for header dependency [...] Maybe that's what happened?
No. I know, that if I just 'touch' or really 'change' a header file, which is (direct or indirect) included in every C file, ALL will be compiled. (Actually 20 years ago this pseudo change (= 'touch' only the timestamp of 1 central file) was the standard method to force a complete compile.)
But I just altered CvSelectionGroup.cpp, nothing else. Expected much faster result: just compile 1 .obj & create .dll. No, all .obj files are recompiled.

Actions so far: Installed following your steps 1-6. Overwrote 58 .cpp & .h with versions from BBAI mod, added 2 new .cpp & .h from this mod to this folder, build first dll, checked: CIV running ok, added the 2 new files to project, altered mentioned .cpp, got lots of errors when trying to build because of double, moved the save copy elsewhere, build 2nd dll, all ok, changed a constant in CvSelectionGroup.cpp (if iCounter == 4 _to_ if iCounter == 1), build 3rd dll, functionally all ok, but all .obj recomplied. Strange.


"[[[minor notes on The solution explorer:"
In this section I quoted from your guide, found that it may be irritating to see discrepancies:
[... all .cpp files are in the 'Source Files' folder, and all .h files are in the 'Header Files' folder ...] that's useful, but _not default_.
What do you mean 'not default'?
In my CIV4 installation's CvGameCoreDLL directory as well as in your downloadable source database all .cpp files and all .h files are flat side by side, no subdirs ...
I interpreted your guide as the state, which is found at the end of installation or after running the IDE the first time.
Did you mean, that I should create 'Source Files' and 'Header Files' folder and copy the sources into them? So that, after this, ... all .cpp files are in the 'Source Files' folder, and all .h files are in the 'Header Files' folder ...??
[... if you use a mod's code and this mod has files which are not in the original BTS source folder, you will not see these files in the solution explorer ...] without any action I _see them_ (marked with little red minus signs
Nice. Didn't know about that one.
Yes, it looks cute, just thought, maybe its irritating to see them while you explicitly write "you will not see" - but no problem.
Btw, do you see them? Please, serious question, see below (thus I stated win7)

AFAIR the .objs are in a 'bin' subdir ... and all of them are marked with those little red minus signs, for source files indicating 'this file doesn't belong to the project' ...
Perhaps this has to do with the "all .obj files are compiled every time" effect??

[edit: Not that I want those .obj files in the same dir as the sources, but if that helps??!]
 
In my CIV4 installation's CvGameCoreDLL directory as well as in your downloadable source database all .cpp files and all .h files are flat side by side, no subdirs ...
Oh! I meant folders in the VS project, not on disk...

[...] but all .obj recomplied. Strange.
Hmmm... works on my machine? :lol:

I remember an issue from years ago that used to cause my makefile to compile an object file every time even though we didn't touch the source file - the source file came from a different machine and its modification time was in the future, so it was always newer than the object file...

Can you check if this is the case for you (maybe your machine time is in the past)?

Btw, do you see them? Please, serious question, see below (thus I stated win7)
I don't see them, but I remembered why you do - you have a little button at the top of the solution explorer, with a tool tip 'show all files'. That should do the trick.

That's probably why you don't see the 'Source Files' and 'Header Files' folders in the project either...

That is not the cause of the .obj issue.
 
No, system time is correct (down to the minutes, ignored seconds) and newest imported source file is (BetterBtSAI):
CvPlayerAI.cpp Modified Sat Sep 4 18:18:29 2010 UTC by jdog5000

All I reported last weekend (complete install and several 'complete' builds) was done in 1 session without reboot.
This weekend all worked normal, ie. quick as lightning.

Perhaps if one intents to start working immediately after installation the parameter "reboot=reallysuppress" should be omitted???
 
This weekend all worked normal, ie. quick as lightning.

Perhaps if one intents to start working immediately after installation the parameter "reboot=reallysuppress" should be omitted???

Maybe :dunno:

Glad to hear it's working :goodjob:
 
Back
Top Bottom