Building a new Tag in C2C code

That cleaned up a lot, and those errors seem to be resolved now.
There did show up a new error about a missing "python.h" file (a c/c++ header file, which might be either the civ4 code for handling python or a part of the python 2.4.x, I did try to set a python 2.4.6 installation as the GLOBALPYTHON target, since there is one under include/python.h, but that just pointed to a pyconfig.h).
The build log is as follows:
Spoiler Build log :

Code:
  Microsoft (R) Program Maintenance Utility Version 14.16.27030.1
  Copyright (C) Microsoft Corporation.  All rights reserved.
 
  SubWCRev: 'D:\Programs\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\Caveman2Cosmos\Sources'
  Last committed at revision 10528
  Updated to revision 10537
  Local modifications found
  Unversioned items found
      "C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"Final_Release\CvGameCoreDLL.pch" /Fd"./Final_Release/" /GR /Gy /W3 /EHsc /arch:SSE2 /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /Zm200 /DXERCES_STATIC_LIBRARY /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /D_MOD_GWARM /D_MOD_SHAM_SPOILER /DC2C_BUILD /DMULTI_FEATURE_MOD /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files (x86)\Microsoft Visual Studio\Shared\ExtraThings\Microsoft Platform SDK/Include" /I"C:\Program Files (x86)\Microsoft Visual Studio\Shared\ExtraThings\Microsoft Platform SDK/Include/mfc" /I"D:\Programs\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"D:\Programs\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\CvGameCoreDLL\Python24/include" /I"./xerces-c-3.1.1-x86-windows-vc-7.1/src" /YcCvGameCoreDLL.h /Fo"Final_Release\_precompile.obj" /c _precompile.cpp
  _precompile.cpp
d:\Programs\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\Caveman2Cosmos\Sources\CvGameCoreDLL.h(250): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
  Stop.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "nmake Final_Release" exited with code 2.
 
I wouldn't worry about any python stuff. It says the path for cl.exe is incorrect. If you don't have the special 2003 toolkit it was posted somewhere in moders documentation by Alberts2 (thanks for the post).
If you've got it already check the path in your makefile.
cl.exe is the first one under #### Tools #### for this makefile.
the path for it is connected to your toolkit, so im guessing you have wrong toolkit or wrong path to toolkit.
setting up vs is just a small test to see if u can handle all the failure you'll experience trying to learn the code.
good luck

Spoiler makefile :

#### Paths ####
TOOLKIT=C:\Program Files (x86)\Vc7
PSDK=C:\Program Files (x86)\Microsoft Visual Studio\PSDK
CIVINSTALL=C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword
GLOBALBOOST=$(CIVINSTALL)\CvGameCoreDLL\Boost-1.32.0
GLOBALPYTHON=$(CIVINSTALL)\CvGameCoreDLL\Python24
TORTOISE="C:\Program files\TortoiseSVN"
## Uncomment to have newly compiled dlls copied to your mod's Assets directory
YOURMOD=$(CIVINSTALL)\Mods\Caveman2Cosmos

include xerces.mk

#### Tools ####
CC="$(TOOLKIT)\bin\cl.exe"
CPP="$(TOOLKIT)\bin\cl.exe"
LD="$(TOOLKIT)\bin\link.exe"
RC="$(PSDK)\Bin\rc.exe"
WCREV="$(TORTOISE)\bin\SubWCRev.exe"
## Uncomment to build dependencies using fastdep
FD="C:\Program Files (x86)\fastdep\fastdep.exe"
 
There did show up a new error about a missing "python.h" file (a c/c++ header file, which might be either the civ4 code for handling python or a part of the python 2.4.x, I did try to set a python 2.4.6 installation as the GLOBALPYTHON target, since there is one under include/python.h, but that just pointed to a pyconfig.h).
This is the path for "Python.h".
...\Beyond the Sword\CvGameCoreDLL\Python24\include\Python.h
 
This is the path for "Python.h".
...\Beyond the Sword\CvGameCoreDLL\Python24\include\Python.h
In other words it is the python.h in python interpreter, which means it should have worked when I pointed the GLOBALPYTHON to a 2.4.6 installation, unless we need a very special version of python (maybe one integrated with boost?).

The problem is that I dont have a natural ...\Beyond the Sword\CvGameCoreDLL\... folder, and the python/boost were not included as folders in the setups of CvGameCoreDLL folders I have found.
It is possible that this may have something to do with this being a steam version (as you can see from some of the paths reported in the build log), and it would be a "bit" combersome to install it outside steam, since I would need to get an external optical drive to install my civ4 complete edition from cd(/dvd?) or go and resurrect an older computer.
 
Almost all the operating systems from Microsoft is of the "Windows NT" family.

Windows 95, 98 and "Me" were not of the Windows NT family.
All other Microsoft OS's made after win 95 are of the Windows NT family.

There was two or three operating systems before Windows 95 that were also of the Windows NT family, they all had "NT" in their names.
Thanks for clarifying. I did not know that.
 
In other words it is the python.h in python interpreter, which means it should have worked when I pointed the GLOBALPYTHON to a 2.4.6 installation, unless we need a very special version of python (maybe one integrated with boost?).

The problem is that I dont have a natural ...\Beyond the Sword\CvGameCoreDLL\... folder, and the python/boost were not included as folders in the setups of CvGameCoreDLL folders I have found.
It is possible that this may have something to do with this being a steam version (as you can see from some of the paths reported in the build log), and it would be a "bit" combersome to install it outside steam, since I would need to get an external optical drive to install my civ4 complete edition from cd(/dvd?) or go and resurrect an older computer.
I can confirm this from a post on their forum. Steam did not include the sources with their distribution. That post links to a file in CivFanatics's Downloads by asaf. However this package he provided didn't include boost or python. For the convenience, I'll upload them here. These files go into the CvGameCoreDLL folder in your BtS install.
If you're missing the whole CvGameCoreDLL folder, you may as well choose the second download, which includes the source code as well as boost and python.
 

Attachments

  • BtS_Boost_Python.zip
    4.7 MB · Views: 262
  • BtS_CvGameCoreDLL.zip
    5.8 MB · Views: 243
Last edited:
That seems to have done it, I can now have it successfully finish the compilation. I will have to actually do tests on whether the resulting .dll works, but that seems fairly likely.
Thank you all very much for the help, especially Anq.
 
That seems to have done it, I can now have it successfully finish the compilation. I will have to actually do tests on whether the resulting .dll works, but that seems fairly likely.
Thank you all very much for the help, especially Anq.
Man I'm terrible at helping with this sort of thing but I'm very glad you got it sorted out. Maybe I can be more help with in-code matters.
 
The problem is that I dont have a natural ...\Beyond the Sword\CvGameCoreDLL\... folder, and the python/boost were not included as folders in the setups of CvGameCoreDLL folders I have found.
It is possible that this may have something to do with this being a steam version (as you can see from some of the paths reported in the build log), and it would be a "bit" combersome to install it outside steam, since I would need to get an external optical drive to install my civ4 complete edition from cd(/dvd?) or go and resurrect an older computer.
I have that folder in my steam edition of BtS... Maybe you need to opt into the beta version to get the source files.
The beta version for BtS in steam is actually the official final release of BtS.
Steam decided to update the game on their own after the gamespy servers went offline, and in the process steam removed multiplayer features that still worked.
I would not be surprised if they decided to remove the source files thinking them junk files that were not needed.
Link to relevant thread.
 
Top Bottom