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

That should work. I doubt that code is storing the last number checked or something. It checks every time is my bet.
 
No, you can download and use Visual Studio Express for free.

Then why didn't the guides posted use Visual C++ Express? If you use Visual Studio to compile you don't have to mess with a makefile. At least that's my understanding of what Rhye did, which could be completely off base.
 
Because the game was built using the DLLs with Visual C++ 2003. If you manage to get a more modern VS to compile and build the DLL (requires some code changes), it will be linked against incompatible DLLs and crash when the game tries to load it.

Thus when you use VS to compile, you're really just using VS to execute the makefile using VC++ 2003.
 
Out of curiosity:

In another thread where discussing compilation of the code for a mod.
The one I got the code from is saying that it compiles for him without problems but I'm encountering numerous errors like this one:
Code:
	for (iI = 0; iI < NUM_PLAYEROPTION_TYPES; iI++)
	{
		gDLL->sendPlayerOption(((PlayerOptionTypes)iI), [I][...][/I]
	}
The parameter 'iI' is undeclared in this context (and the surrounding context too). It is of course easily fixable by defining iI right in the head of the loop but my question is:
How can this be compiling for somebody else ? Are there some autocompletion features in Visual Studio on simple errors like these or anything ?

Thanks, f.
 
It sounds like you're trying to have Visual Studio do the compilation instead of using the Makefile with nmake. Did you follow Refar's guide to setting up the SDK?
 
Yes. I figured out what was wrong just yesterday. It seems that VS 2010 is using different standard compiler settings than previous versions.

I had to add /Zc:forScope- as an option to make it work for me.
 
Ok a couple of things went wrong and I'm not really used to Visual Studio, so maybe you can help me. I'm using VS 2010.

  • At first, when I created the project as described, I selected it as an VC++ Makefile project. But when I named the active configuration 'Final_Release' I get presented a lot of VC++ property options instead of the Makefile options. So I just named it 'Release'.
  • Second, I cannot execute the clean command. Whenever I try it, I get an error that the nmake command cannot be found. The executable directory for VC is set to the right path, for building it also has no problems with nmake, so: :confused:
  • And third, at the very end of the build I get an error that nmake doesn't know how to build the target CvGameCoreDLL.res. I 'corrected' this the naive way by just commenting out the two lines in the Makefile:
    • Debug_RESOURCE=Debug\CvGameCoreDLL.res and
    • Release_RESOURCE=Debug\CvGameCoreDLL.res

Now the build finished, the .dll file is around 0,25MB larger than the original one (from the same sources) and Civ just crashes upon trying to load it.

I would be glad if somebody could help me to get this fixed.

Thanks, f.
 
Back
Top Bottom