Installing and using the SDK

Yes you should delete the .obj files to make a rebuild. Under the CvGameCoreDLL folder you will find a folder named Final_Release just remove everything inside this folder or remove the folder itself. It will be recreated again.
 
I got the following errors during linking.

What is wrong?

Code:
Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
MSVCRT.lib(crtdll.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored
MSVCRT.lib(crtdll.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40300040)
MSVCRT.lib(crtdll.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored
MSVCRT.lib(crtdll.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40300040)
   Creating library ..\Beyond the Sword\Assets\CvGameCoreDLL.lib and object ..\Beyond the Sword\Assets\CvGameCoreDLL.exp
FDialogTemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ)
_precompile.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ) referenced in function $L144426
CyTeamInterface.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ)
CyUnit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ) referenced in function $L147631

...

and a lot of other similar errors...

I should say that I installed Windows XP SP2 Platform SDK instead of just Platform SDK. Is it important?
 
Go read the first post. You need the Platform SDK from Microsoft that the game was made with which I think is August 2005, or I am guessing. Nothing else will work to re-compile the game for the game's SDK that you can download. Read the instructions, download the proper Platform SDK. Do not try the debug setting, just Final Release, unless you are just re-compiling an individual file. All the files are too much to debug at one time, and it won't do it.
 
And remember that to download a Platform SDK from Microsoft there are different ways to download it. (not so with Direct X SDK's). If you have a slow connection like me, it will take longer, but you can download it in 25mB chunks or so of about 16 different downloads or 18 whatever it is. Otherwise, there is the ISO type download so you can put it to a CD or DVD, or the main download which is one chunk of about something like 500mB file. These files are huge, but the 448mB Direct X SDK can only be downloaded all at once. Since my internet connection can only be on for 4 hours at a time, although I can hook up right away again - it is the Service of the Internet Provider, and if I could stay online for like 18 hours then I could download that stuff in one chunk but again it would take 18 hours total time about or more or less. If I change Internet Service Provider that would not cut me off after 4 hours, then I would not have that problem, that probably many other people do not have, but still the files are huge and it takes a long time without having a fast Internet connection speed.
That's life and that is Microsoft's SDK's from Microsoft.
However, I think I will change Internet Service Provider so I can download some stuff for a day about then it will be done, until I get a faster Internet speed connection maybe someday.

Download the correct download files for the way you want to download from Microsoft for any Platform SDK but again, you need the correct version of the Platform SDK on which this game was built with. Not something else, because all versions either add something or delete something and change something because Microsoft keeps changing things especially Visual Studio. NET programs -- like the 2002 version, the 2003 versions - needed for this game, the 2005 version, and the soon 2008 version. Express versions can be downloaded but again, they have changed those versions and for this game they will not work, unless you have a Make file that was earlier in this thread to tell the program which compiler to use and how the Make file tells the version of the program how to compile the file in the first place. Fun?
Well, that is programming and according to Microsoft.
And, well, it is their program unfortunately and they keep changing it.
:crazyeye:
Security no doubt being one of the reasons because of people on the Internet or should I say -- hackers, viruses, and other malicious software floating around this WWW.
 
I have used VC++ 2005 Express, and have problem with Beyond The Sword SDK. Error message is this:
Spoiler :
Error 1 error LNK2019: unresolved external symbol "void __cdecl CyPlayerPythonInterface2(class boost::python::class_<class CyPlayer,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyPlayerPythonInterface2@@YAXAAV?$class_@VCyPlayer@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ) CvDLLPython.obj



Warlods compilation works fine, but there is a problem with this sdk.
 
I got the following errors during linking.

What is wrong?

Resolved. (I was sure that I grabbed msvcrt.lib, msvcrtd.lib, and msvcprt.lib, actually I didn't :mischief: ). Sorry for wasting your time.

Yesterday, first time I could compile DLL successfully! :goodjob:
 
I am trying to just build the SDK included with BTS 3.13 (it is included, right? It is the folder CvGameCoreCoreDLL?). I haven't made any changes yet, I'm doing a test first.

I follow all the steps and I keep getting the same error. It seems to start fine and then it just quits all of a sudden with this in the build log:

Project : CvGameCoreDLL
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CyArea.cpp
CvArtFileMgr.cpp
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL' failed.
 
OK, I figured this out. The answer is here:

http://forums.civfanatics.com/showthread.php?t=233538

Maybe it should be added as a step to the tutorial, since it won't work (at least not for BTS) as stated in the original post without this step. Resources.h and CvGameCoreDLL.res must be deleted, and in the panel at the left, the file must also be removed from the folder called "Other" (below "Headers")
 
[...]
Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL' failed.
Oh, right. I got the same error when I tried to compile the dll the first time. I forgot it. You have to remove "CvGameCoreDLL.rc" from the project. Just "right click" > "remove from project" or something like that.

EDIT: Oh, I have been a bit too late. But I agree: It would be great if this could be added to the initial post.
 
Here are my compiler/linking flags for Visual Studio 2003 (for the Final_Release Configuration).
These give a DLL that is exactly the same size as that shipped by Firaxis.

Compiler:
/O2 /G7 /I "Boost-1.32.0\include" /I "Python24\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "CVGAMECOREDLL_EXPORTS" /D "FINAL_RELEASE" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /GR /Yu"CvGameCoreDLL.h" /Fp"Final Release/CvGameCoreDLL.pch" /Fo"Final Release/" /Fd"Final Release/vc70.pdb" /W3 /nologo /c /Zi /Gd /TP

Linker:
/OUT:"../Assets/CvGameCoreDLL.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"Python24\libs" /LIBPATH:"boost-1.32.0\libs\\" /DLL /DEBUG /PDB:"Final Release/CvGameCoreDLL.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /IMPLIB:"Final Release/CvGameCoreDLL.lib" /MACHINE:X86 boost_python-vc71-mt-1_32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\Boost-1.32.0\libs\boost_python-vc71-mt-1_32.lib"

Could someone please translate all of the above for an ignorant like me? I can find some of the values, but far from all of them. Yesterday, I managed to compile a working DLL with some changes to some of the source files. However, this DLL is 6,3 MB, so nearly 1,5 MB bigger than an original 3.13 DLL. The changes were not that many, so I'd like to know how to set up the compiler so it makes a smaller DLL.
 
Could someone please provide me insight into these warnings/errors:

cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
cl : Command line warning D4027 : source file 'EHsc' ignored

culminating in...

fatal error c1067: compiler limit : debug information module size exceeded

It was working (well almost) without these errors before... they crept in quite suddenly and I haven't once been able to run it without these errors

Kevin
 
Hi, I think I need a little help.
I have installed the SDK, the 2003 C++ Toolkit and codeblocks.
I have created a project, followed all other instructions [I am pretty sure correctly] and started a build.
about 5 min into the build I get the following:
-------------- Build: Final Release Win32 in CvGameCoreDLL ---------------

CyCityInterface1.cpp
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\memory(498) : fatal error C1067: compiler limit : debug information module size exceeded
Process terminated with status 2 (0 minutes, 12 seconds)
1 errors, 0 warnings

Which maybe I am really clueless but I don't understand this error.
Any help from the masses?
 
Gedrin, by default the BTS project has the /Zi (Produce debugging symbols) option enabled. You want to turn that off to get past the compiler limit error:
- under: Project --> Build options...
- in the tab for: Final Release Win 32 --> Compiler Settings --> Other Options
- remove: /Zi

Other deviations from the tutorial that I had to make to get everything to build properly include the following:
1) remove CvGameCoreDLL.rc from the project (you must have already done this though to get this far):
- in the Projects workspace tab go to the directory (Resources) and right click on the CvGameCoreDLL.rc file. Select "Remove from project"
2) remove CvGameCoreLL_DEBUG.pdb from linker:
- under: Projects --> Build options...
- in the tab for: Final Release Win 32 --> Linker Settings --> Other Linker Options
- remove: /pdb:Final Debug Win32\CvGameCoreDLL_DEBUG.pdb
 
If someone is having problems here are A few thing a noticed:

1) they have updata code blocks since this was post so the screen shoot are not exactly right, but close enough.

2) some of the values your ask to change do not appear until you have already tried to compile.

My advise is try to compile then repeat steps 6-8 on the page one like you nevered did them. oh and make sure it is using the right compiler, i click the right one on first startup but it did seem to make it defualt compiler for the project.
 
Alright, mine compiled, but it doesn't give me a dll. It just gives me several .obj files in \CvGameCoreDLL\Final Release Win32. (Using the free method)


EDIT: Oh geez, never mind. I hit a wrong button and sent the file into the depths of my documents folder. I'm fine. >.>
 
Project build:

fatal error LNK1181: cannot open input file 'boost_python-vc71-mt_32.lib'

Newbie slavishly following posted instructions.... help appreciated.

I know there is an earlier post but - well - I just couldn't get my head round it....
 
Top Bottom