C++ Help

Joined
Sep 24, 2007
Messages
108
Location
Houston,TX
I have tried multiple times to make minor SDK changes, but it doesn't seem to work. I have been able to compile a working dll for BtS v3.13, but I can't get any changes to work. :mad:

I plan to start with a very simple change to allow more civs. I have read in multiple threads that all that needs to be done is a simple change in the CvDefines file. I have tried changing the value 18 to 40, but whenever I compile it the file says it has not been modified since it was compiled. I am using VC++ 2005 Express. I used this guide http://forums.civfanatics.com/showthread.php?t=196283
to set everything up and start the project, and the BtS makefile on page 2 of the thread.

Possible Problems: :confused:
-I noticed that when I compile a dll using the source code from the BtS/CvGameCoreDLL folder it is 4.63MB rather than 4.64MB (the size of the one in the assets folder)
-I have tried starting over multiple times, and sometimes when I add the files to the project it says that there is '1 hidden file that was not copied'. Could this affect anything?
-I have tried just replacing files with the source code of mods and it doesn't seem to recognize the change when I try to recompile.

I would appreciate anyone willing to help or any suggestions. This may be an error of my own stupidity. I just want to be able to combine some of the great SDK modcomps out there. Thanks in advance
 
Delete the intermediate files and try again. Those will be all of the *.obj files wherever you have your compiler configured to store them.
 
Make sure when you build it its under "Final Release" profile.

Do what Seven05 says above.

Make sure ALL files in CvGameCoreDLL folder are not hidden and not read-only.
 
Thanks for the advice. Nothing is hidden now, and I deleted the intermediate files and I'm in the process of recompiling before I try again. Does anyone have any idea as to why the file is smaller and whether it affects anything? Also, deleting the dll forces it to recompile as well right?

I tried recompiling with bhruic's unofficial patch, but it crashed when I tried to start a random map. The change for more civs didn't work either...
 
Sounds like you might have a prob then. I'd be looking at VS 2005.

With VS 2003:
Firaxis DLL: 4871480
My DLL: 4870144

The difference is size would be related to the couple of USER_DLL definitions placing in different code.
 
Mine tend to be somewhere in the range of 4,857,856. I don't know what could be missing...
The CvGameCoreDLL folder itself is 138,079,574 with final_release. I also noticed that the folder itself is marked as 'read only' though the files aren't and maintain changes.
 
Just a question, but is your setup retail (disk based) BtS then patch 3.13 installed over it? Or do you have the steam version?
 
Just asking if you bought a steam (download) version or a boxed (disk-based) version cuz we've found in the past that the steam version can be different to the disk version.
 
Ahhh....... I've not had any problems with the resource files compiling 3.13 in .Net 2003. I'm not sure about any other environment though.

Sorry can't help you further.
 
Thanks for the advice. I'm using (or trying to use) VS C++ 2005 Express. I'm going to try some of the ideas in other threads. Also, do you know of any other good programs to compile the code?
 
VC 2005 Express is probably the best free one out there. It's the only compiler I've used for Civ4 and it hasn't given me any trouble at all.

The express editions don't support resource editing, I don't recall deleting them but...

Here's my development directory so you can compare:
Spoiler :
Volume in drive F is GAMES
Volume Serial Number is BCD4-687D

Directory of F:\Civ4 AI DLL\CvGameCoreDLL

01/09/2008 02:34 AM <DIR> .
01/09/2008 02:34 AM <DIR> ..
08/30/2007 10:17 AM 2,055 AI_Defines.h
10/02/2007 10:31 AM <DIR> Boost-1.32.0
04/26/2007 04:01 AM 27,533 CvArea.cpp
08/30/2007 10:18 AM 6,101 CvArea.h
08/30/2007 10:18 AM 5,462 CvArtFileMgr.cpp
08/30/2007 10:18 AM 3,544 CvArtFileMgr.h
01/07/2008 09:47 PM 345,786 CvCity.cpp
10/16/2007 08:38 PM 58,383 CvCity.h
12/28/2007 08:09 PM 278,918 CvCityAI.cpp
08/30/2007 10:18 AM 7,640 CvCityAI.h
10/14/2007 04:54 PM 27,078 CvDeal.cpp
08/30/2007 10:18 AM 2,679 CvDeal.h
10/24/2007 03:21 PM 4,782 CvDefines.h
11/21/2006 12:02 PM 6,220 CvDiploParameters.cpp
11/21/2006 12:02 PM 3,118 CvDiploParameters.h
09/05/2007 03:00 AM 92,215 CvDLLButtonPopup.cpp
08/30/2007 10:18 AM 3,190 CvDLLButtonPopup.h
08/30/2007 10:18 AM 16 CvDLLDataStreamIFaceBase.h
08/30/2007 10:18 AM 4,172 CvDLLEngineIFaceBase.h
06/14/2007 10:33 PM 2,164 CvDLLEntity.cpp
08/30/2007 10:18 AM 1,929 CvDLLEntity.h
08/30/2007 10:18 AM 3,089 CvDLLEntityIFaceBase.h
08/30/2007 10:18 AM 5,258 CvDLLEventReporterIFaceBase.h
08/30/2007 10:18 AM 1,461 CvDLLFAStarIFaceBase.h
02/05/2007 12:19 PM 1,931 CvDLLFlagEntityIFaceBase.h
08/30/2007 10:18 AM 914 CvDLLIniParserIFaceBase.h
08/30/2007 10:18 AM 10,340 CvDLLInterfaceIFaceBase.h
08/30/2007 10:18 AM 690 CvDLLPlotBuilderIFaceBase.h
04/06/2007 04:01 AM 2,841 CvDLLPython.cpp
08/30/2007 10:18 AM 6,617 CvDLLPythonIFaceBase.h
08/30/2007 10:18 AM 3,532 CvDLLSymbolIFaceBase.h
08/30/2007 10:18 AM 13,158 CvDLLUtilityIFaceBase.h
10/30/2007 05:58 PM 144,755 CvDLLWidgetData.cpp
08/30/2007 10:18 AM 14,576 CvDLLWidgetData.h
08/30/2007 10:18 AM 6,720 CvDLLXMLIFaceBase.h
01/06/2008 01:27 PM 57,399 CvEnums.h
12/28/2007 03:50 PM 57,059 CvEnums.h.bak
08/30/2007 10:18 AM 10,406 CvFractal.cpp
08/30/2007 10:18 AM 2,025 CvFractal.h
01/06/2008 02:53 PM 288,304 CvGame.cpp
01/05/2008 10:51 AM 30,897 CvGame.h
08/30/2007 10:18 AM 2,692 CvGameAI.cpp
08/30/2007 10:18 AM 595 CvGameAI.h
11/21/2006 12:02 PM 2,692 CvGameCoreDLL.cpp
08/30/2007 10:18 AM 5,515 CvGameCoreDLL.h
01/08/2008 01:19 AM 16,845,824 CvGameCoreDLL.ncb
08/08/2007 01:25 PM 2,575 CvGameCoreDLL.rc
10/02/2007 10:49 AM 748 CvGameCoreDLL.sln
10/02/2007 10:49 AM 14,093 CvGameCoreDLL.vcproj
01/08/2008 01:19 AM 823 CvGameCoreDLL.vcproj.GREENMACHINE.Administrator.user
08/30/2007 10:18 AM 765 CvGameCoreDLLDefNew.h
08/30/2007 10:18 AM 121 CvGameCoreDLLUndefNew.h
10/30/2007 07:40 PM 61,294 CvGameCoreUtils.cpp
08/30/2007 10:18 AM 16,606 CvGameCoreUtils.h
12/06/2007 07:22 PM 458,083 CvGameTextMgr.cpp
08/30/2007 10:18 AM 16,763 CvGameTextMgr.h
09/11/2007 03:00 AM 87,044 CvGlobals.cpp
09/11/2007 03:00 AM 45,864 CvGlobals.h
11/21/2006 12:02 PM 509 CvHallOfFameInfo.cpp
11/21/2006 12:02 PM 348 CvHallOfFameInfo.h
01/07/2008 12:52 AM 652,294 CvInfos.cpp
01/07/2008 12:52 AM 226,825 CvInfos.h
08/30/2007 10:18 AM 14,015 CvInfoWater.cpp
08/30/2007 10:18 AM 5,339 CvInfoWater.h
12/13/2007 03:46 PM 50,834 CvInitCore.cpp
09/11/2007 03:00 AM 14,460 CvInitCore.h
10/29/2007 04:27 PM 30,235 CvMap.cpp
08/30/2007 10:18 AM 9,020 CvMap.h
08/30/2007 10:18 AM 31,447 CvMapGenerator.cpp
08/30/2007 10:18 AM 2,329 CvMapGenerator.h
01/07/2008 09:47 PM 522,603 CvPlayer.cpp
01/07/2008 06:00 PM 70,683 CvPlayer.h
01/06/2008 11:50 AM 492,394 CvPlayerAI.cpp
12/29/2007 03:34 PM 17,858 CvPlayerAI.h
01/06/2008 11:50 AM 227,512 CvPlot.cpp
11/01/2007 03:42 PM 30,037 CvPlot.h
08/30/2007 10:18 AM 6,663 CvPlotGroup.cpp
08/30/2007 10:18 AM 1,306 CvPlotGroup.h
04/20/2007 04:00 AM 5,133 CvPopupInfo.cpp
04/20/2007 04:00 AM 2,367 CvPopupInfo.h
11/21/2006 12:02 PM 5,457 CvPopupReturn.cpp
08/30/2007 10:18 AM 5,532 CvPopupReturn.h
11/21/2006 12:02 PM 1,869 CvRandom.cpp
08/30/2007 10:18 AM 678 CvRandom.h
08/30/2007 10:18 AM 17,463 CvReplayInfo.cpp
11/21/2006 12:02 PM 4,146 CvReplayInfo.h
11/21/2006 12:02 PM 2,240 CvReplayMessage.cpp
11/21/2006 12:02 PM 1,005 CvReplayMessage.h
12/29/2007 12:51 AM 99,404 CvSelectionGroup.cpp
10/30/2007 10:51 PM 95,698 CvSelectionGroup.cpp.bak
08/30/2007 10:18 AM 10,945 CvSelectionGroup.h
10/28/2007 03:50 PM 18,367 CvSelectionGroupAI.cpp
08/30/2007 10:18 AM 1,958 CvSelectionGroupAI.h
08/30/2007 10:18 AM 11,892 CvString.h
05/10/2007 04:00 AM 14,824 CvStructs.cpp
08/30/2007 10:18 AM 11,585 CvStructs.h
05/12/2007 03:59 AM 5,056 CvTalkingHeadMessage.cpp
05/12/2007 03:59 AM 2,109 CvTalkingHeadMessage.h
01/06/2008 01:29 PM 167,225 CvTeam.cpp
01/04/2008 08:44 PM 23,709 CvTeam.h
10/16/2007 11:56 PM 92,434 CvTeamAI.cpp
08/30/2007 10:18 AM 6,880 CvTeamAI.h
11/21/2006 12:02 PM 16,565 CvTextScreens.cpp
01/07/2008 04:11 PM 351,629 CvUnit.cpp
01/07/2008 04:02 PM 359,026 CvUnit.cpp.bak
12/29/2007 12:57 AM 44,900 CvUnit.h
09/05/2007 03:00 AM 44,276 CvUnit.h.bak
01/07/2008 10:18 AM 387,455 CvUnitAI.cpp
12/20/2007 02:25 PM 386,922 CvUnitAI.cpp.bak
08/30/2007 10:18 AM 7,939 CvUnitAI.h
08/30/2007 10:18 AM 19,539 CvXMLLoadUtility.cpp
08/30/2007 10:18 AM 17,588 CvXMLLoadUtility.h
11/21/2006 12:02 PM 45,153 CvXMLLoadUtilityGet.cpp
02/07/2007 05:00 AM 10,601 CvXMLLoadUtilityInit.cpp
08/30/2007 10:18 AM 101,541 CvXMLLoadUtilitySet.cpp
11/21/2006 12:02 PM 5,185 CyArea.cpp
08/30/2007 10:18 AM 2,176 CyArea.h
11/21/2006 12:02 PM 5,020 CyAreaInterface.cpp
03/01/2007 05:00 AM 2,297 CyArgsList.cpp
08/30/2007 10:18 AM 1,113 CyArgsList.h
11/21/2006 12:02 PM 2,554 CyArtFileMgr.cpp
08/30/2007 10:18 AM 1,801 CyArtFileMgr.h
11/21/2006 12:02 PM 2,234 CyArtFileMgrInterface.cpp
08/30/2007 10:18 AM 54,980 CyCity.cpp
08/30/2007 10:18 AM 20,321 CyCity.h
08/30/2007 10:18 AM 42,883 CyCityInterface1.cpp
11/21/2006 12:02 PM 1,870 CyDeal.cpp
08/30/2007 10:18 AM 661 CyDeal.h
01/06/2008 01:27 PM 89,430 CyEnumsInterface.cpp
12/28/2007 03:50 PM 88,438 CyEnumsInterface.cpp.bak
12/19/2007 01:42 PM 27,275 CyGame.cpp
12/19/2007 01:42 PM 10,337 CyGame.h
05/10/2007 04:00 AM 6,365 CyGameCoreUtils.cpp
08/30/2007 10:18 AM 3,365 CyGameCoreUtils.h
05/10/2007 04:00 AM 5,869 CyGameCoreUtilsInterface.cpp
12/19/2007 01:42 PM 17,497 CyGameInterface.cpp
05/23/2007 04:00 AM 8,928 CyGameTextMgr.cpp
08/30/2007 10:18 AM 3,242 CyGameTextMgr.h
03/28/2007 04:00 AM 4,480 CyGameTextMgrInterface.cpp
06/07/2007 04:00 AM 16,713 CyGlobalContext.cpp
09/11/2007 03:00 AM 18,089 CyGlobalContext.h
05/08/2007 09:10 AM 10,258 CyGlobalContextInterface1.cpp
09/11/2007 03:00 AM 6,142 CyGlobalContextInterface2.cpp
01/30/2007 12:36 PM 4,588 CyGlobalContextInterface3.cpp
06/07/2007 04:00 AM 14,464 CyGlobalContextInterface4.cpp
11/21/2006 12:02 PM 422 CyHallOfFameInfo.cpp
08/30/2007 10:18 AM 358 CyHallOfFameInfo.h
11/21/2006 12:02 PM 4,081 CyHallOfFameInterface.cpp
08/30/2007 10:18 AM 40,624 CyInfoInterface1.cpp
06/13/2007 05:57 PM 24,295 CyInfoInterface2.cpp
06/13/2007 01:58 AM 48,544 CyInfoInterface3.cpp
11/21/2006 12:02 PM 6,820 CyMap.cpp
08/30/2007 10:18 AM 2,787 CyMap.h
11/21/2006 12:02 PM 3,507 CyMapGenerator.cpp
08/30/2007 10:18 AM 1,570 CyMapGenerator.h
11/21/2006 12:02 PM 2,211 CyMapGeneratorInterface.cpp
11/21/2006 12:02 PM 6,070 CyMapInterface.cpp
09/05/2007 03:00 AM 58,887 CyPlayer.cpp
09/05/2007 03:00 AM 20,476 CyPlayer.h
09/05/2007 03:00 AM 35,943 CyPlayerInterface1.cpp
08/30/2007 10:18 AM 4,132 CyPlayerInterface2.cpp
08/30/2007 10:18 AM 25,870 CyPlot.cpp
08/30/2007 10:18 AM 10,148 CyPlot.h
06/07/2007 04:00 AM 17,573 CyPlotInterface1.cpp
11/21/2006 12:02 PM 598 CyRandomInterface.cpp
11/21/2006 12:02 PM 6,360 CyReplayInfo.cpp
08/30/2007 10:18 AM 2,047 CyReplayInfo.h
04/17/2007 03:59 AM 8,997 CySelectionGroup.cpp
08/30/2007 10:18 AM 2,959 CySelectionGroup.h
04/17/2007 03:59 AM 6,454 CySelectionGroupInterface.cpp
06/10/2007 01:02 AM 8,840 CyStructsInterface1.cpp
08/30/2007 10:18 AM 23,870 CyTeam.cpp
08/30/2007 10:18 AM 9,372 CyTeam.h
08/30/2007 10:18 AM 16,277 CyTeamInterface.cpp
09/05/2007 03:00 AM 37,612 CyUnit.cpp
09/05/2007 03:00 AM 13,440 CyUnit.h
09/05/2007 03:00 AM 24,565 CyUnitInterface1.cpp
01/09/2008 02:34 AM 0 dir.txt
11/21/2006 12:02 PM 4,417 FAssert.cpp
08/30/2007 10:18 AM 1,251 FAssert.h
08/30/2007 10:19 AM 2,709 FAStarNode.h
08/30/2007 10:19 AM 4,343 FDataStreamBase.h
11/21/2006 12:02 PM 5,191 FDialogTemplate.cpp
08/30/2007 10:18 AM 2,235 FDialogTemplate.h
08/30/2007 10:19 AM 8,479 FFreeListArray.h
08/30/2007 10:19 AM 3,733 FFreeListArrayBase.h
08/30/2007 10:19 AM 10,839 FFreeListTrashArray.h
01/07/2008 01:03 AM <DIR> Final_Release
08/30/2007 10:19 AM 6,960 FInputDevice.h
11/21/2006 12:02 PM 2,923 FProfiler.h
08/30/2007 10:19 AM 6,237 FVariableSystem.h
11/21/2006 12:04 PM 33,698 FVariableSystem.inl
11/21/2006 12:02 PM 799 interfaceDirtyBits.inl
08/30/2007 10:18 AM 7,999 LinkedList.h
10/02/2007 11:15 AM 111,257 Makefile
10/02/2007 10:31 AM <DIR> Python24
10/02/2007 10:41 AM 1,076 readme.txt
08/30/2007 10:18 AM 423 resource.h
12/06/2007 07:16 PM <DIR> Temp
11/21/2006 12:02 PM 84 _precompile.cpp
196 File(s) 25,083,812 bytes
6 Dir(s) 18,848,944,128 bytes free


And my BtS makefile is attached (be careful if you copy this, I have 64-bit windows so the directory names are different). You have to rename it, there shouldn't be a .txt extension but I had to add that to attach it here.

If neither of those help it's a configuration error with the compiler. The VC 2005 Express tutorial post in the tutorial forum is all I needed to get it up and running.
 

Attachments

I use VC 2003, which is what Civ4 was written in. Thus, I have no issues at all. Just open the project file. :)
 
Back
Top Bottom