[SDK] Using Microsoft Visual C++ 2005 Express Edition

It happens in every game, no matter the siaze map, number of civs, etc. The build I'm working on is an update of the Merged Mod (maybe I should get a new title, eh? :D), and the only new thing is the Better AI 0.70. Given that jdogs work is usually very stable, I am a bit puzzled as to where the error is coming from. The code I've posted is even unchanged from BTS 3.17.
 
I've found (or rather gatling found it, and reported it to me) a critical bug in RevDCM 2.00 I believe is caused by Better AI 0.70 as well. So it might not be your fault Ninja. The failed assert I'm getting is in CvSelectionGroup though, not CvCity. The assert says the top unit is stuck in an infinite loop though, so I can be reasonably certain it's not caused by any change in Legends from RevDCM. Also looks like you are getting something similar, an infinite loop in AI logic.
 
So. Are there new instructions and makefiles for 3.19 yet? Because Refars instructions and makefile for 3.17 don't work.

1>CvArea.cpp
1>c:\Users\Tholish\Desktop\CvGameCoreDLL\CvGameCoreDLL.h(17) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'
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:\Users\Tholish\Desktop\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Just based on wild optimism, I tried to open it up in straight VC++2005. It did a little conversion thing, then I tried to build and it had the same issue. Couldn't find windows.h.
 
You will need to add a number of new files to the makefile:

CvDllPythonEvents.cpp
CvDllPythonEvents.h
CvDllTranslator.cpp
CvDllTranslator.h
CvEventReporter.cpp
CvEventReporter.h
CvGameCoreDLL.rc
CvGameCoreDLL.vcproj
CvGameCoreDLL.vcproj.vspscc
CvMessageControl.cpp
CvMessageControl.h
CvMessageData.cpp
CvMessageData.h
CvStatistics.cpp
CvStatistics.h
CyMessageControl.cpp
CyMessageControl.h
CyMessageControlInterface.cpp

No idea what the windows.h thing is ...
 
And also remove CvUtilityIFaceBase.cpp?

I attach the one I made, but I didn't do anything about:

CvGameCoreDLL.rc
CvGameCoreDLL.vcproj
CvGameCoreDLL.vcproj.vspscc

Aren't those in all projects?
 
Thanks Tholish for sharing, but there are some typos in your Makefile and a file missing. I hope my Makefile attached to this post is better. Worked for me. :)

And "yes", you are right, you don't need to add the two project files and the ressource file to the Makefile. That's probably not working at all.
 

Attachments

  • Makefile for BtS 3.19.zip
    6.1 KB · Views: 321
I couldn't build a new folder for 3.19, always got a message about not being able to find Windows.h. So I reinstalled 3.17, started working on my mod again. I made DLL changes so global warming would be a feature rather than a terrain. Works great, so I want to share it as a modcomp by making a new DLL with just that. So I copy the original source folder out of the Bts folder, set it up and try to build. Same message about Windows.h. I look in my functional 3.17 dll modification folder, and lo and behold the same includes are there. They are not new with 3.19, something has changed about my setup. Is this Windows.h thing a common problem that somebody has a solution for?

Never mind. I fixed it by adjusting some stuff. Got a functional 3.19.
 
Code:
1>Boost-1.32.0\include\boost\tuple\detail\tuple_basic.hpp(338) : fatal error C1067: compiler limit : debug information module size exceeded
1>NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

any idea? was trying to compile a new debug dll.
 
Yeah that's a missing "debug" option in the makefile you need. It needs "SAFE" included I think for CyMapInterface. Can't remember exactly from memory. Check out the RevolutionDCM makefile when I release in the next few hours.
Cheers.
 
yo, I used Jean's Makefile and the instructions for warlords in the OP for my BTS 3.19 (shouldn't be TOO different, right?), and got this error:
>NMAKE : fatal error U1052: file 'Final_Release' not found
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://j:\Advanced Diplomacy\CvGameCoreDLL\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 2 error(s), 0 warning(s)

What does this mean, and how can I fix it?
 
any debug dll tutorial for 3.19 around?

@glider1: where can I find your makefile?
 
I couldn't build a new folder for 3.19, always got a message about not being able to find Windows.h.

You need to point your makefile/compiler to the PSDK or VC++ toolkit's includes folder. Here are mine from BULL:

Code:
### Tool Paths

TOOLKIT = C:\Coding\Microsoft Visual C++ Toolkit 2003
PSDK = C:\Program Files\Microsoft Platform SDK

### Civ4 SDK Paths

CIV = C:\Games\Civ4\Beyond the Sword
SDK = $(CIV)\CvGameCoreDLL
BOOST = $(SDK)\Boost-1.32.0
PYTHON = $(SDK)\Python24
BUFFY = $(CIV)\Mods\BUFFY Dev

### Common Compiler/Linker Options

INCS = /I"$(BOOST)/include" /I"$(PYTHON)/include" [B]/I"$(TOOLKIT)/include" /I"$(PSDK)/Include"[/B]
LIBDIRS = /LIBPATH:"$(PYTHON)/libs" /LIBPATH:"$(BOOST)/libs/" /LIBPATH:"$(PSDK)/Lib" /LIBPATH:"$(TOOLKIT)/lib"
LIBS = boost_python-vc71-mt-1_32.lib winmm.lib user32.lib gdi32.lib Ole32.lib

file 'Final_Release' not found

When you setup your IDE/compiler to use the makefile, you used the target "Final_Release" to build the normal DLL. The makefile must have this as a target. Targets are typically files, so that's why it is complaining about a missing file rather than target (I think). Look for a line that looks like this in the makefile:

Code:
Final_Release: ...
 
@EmperorFool: What do I do when I find that line?

Edit: I check the corresponding directories, the file exists...dunno...
 
There should be a directory named Final_Release, but not a file. Here's the line from my makefile, based on Refar's:

Code:
Final_Release: depend_Final_Release Final_Release_DIRS Final_Release-before $(Final_Release_BIN) Final_Release-after

$(Final_Release_BIN) should evaluate to the DLL itself. The others are other targets like Final_Release itself. How much did you change the makefile you started with? Post the whole makefile and maybe someone will have a thought.
 
To be honest, I only changed three things: two were the directories at top, one was the PSDK lib directory (had to add one extra folder).

Attached is the Makefile:
 
It says 2 errors in your post. Is that the total output of building the project? Can you build again and post the full output? Don't do a rebuild as we don't need to see all the compilation steps. Just do a build and post the whole output.
 
Here...

1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>NMAKE : fatal error U1052: file 'Final_Release' not found
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://j:\Advanced Diplomacy\CvGameCoreDLL\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 2 error(s), 0 warning(s)

tenchars
 
Hmm, your makefile looks good to me. Did it create the Final_Release folder? Did it compile all the .cpp files into .obj files into that folder?
 
any debug dll tutorial for 3.19 around?
@glider1: where can I find your makefile?

Sorry Cybah, missed your post. This makefile compiles a debug dll for RevDCM. It is 3.19 compatible but you will have to remove the references to the extra files. That is fairly simple to do. Otherwise, just take a look at the file that the compiler is complaining about, and adjust the switches in your makefile to be the same as the RevDCM makefile.

Be interested to hear if you can get 3.19 debug happening.
Cheers
 

Attachments

  • RevDCM25_debug_makefile.zip
    6.3 KB · Views: 293
CvXMLLoadUtilityModTools.cpp

CvXMLLoadUtilitySetMod.cpp

do I need those files in the makefile or are they DCM related? because I can find them in the CvGameCoreDLL folder.



damn.... debugging still does not work.

Code:
1>Boost-1.32.0\include\boost\tuple\detail\tuple_basic.hpp(338) : fatal error C1067: compiler limit : debug information module size exceeded
1>NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

it stopped after CyMapInterface.cpp.
 
Top Bottom