Using Microsoft Visual C++ 2008 Express Edition

terrasol

Chieftain
Joined
Jun 20, 2004
Messages
33
First, i have to say: That's not my work. All what you need, you can find in the following Thread :

[SDK] Using Microsoft Visual C++ 2005 Express Edition (CIV_IV)

I use this for making a complete solution for the Microsoft Visual C++ 2008 Express Edition

You only need the C++ IDE!

You CAN use the free Microsoft Visual C++ 2008 Express Edition to mod Civilization IV:Colonization.

All following downloads, you can find here

Let’s do it:

1 - Download and install Microsoft Visual C++ Toolkit 2003.

2 - Download the following three library files and put them in the folder:

C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib

msvcrt.lib
msvcrtd.lib
msvcprt.lib


4 - Download and install the Microsoft Platform SDK.


5 - Download the VC2008Col4.rar, put the folder 'OriginallDLL' in the mods-directory from colonization (example-Vista: 'C:\Users\-youraccountname-\Documents\My Games\Sid Meier's Civilization IV Colonization\MODS')

6 - Search the Makefile, open it in WordPad (not Notepad).

At the very top, change the line that begins with TOOLKIT to the path of your Visual C++ Toolkit 2003 directory.

Change the line that begins with PSDK to the path of your Microsoft Platform SDK.

Save and exit.

8 - Download and install Microsoft Visual C++ 2008 Express Edition

9 - open the File 'CvGameCoreDLL.sln' in '\MODS\OriginallDLL\CvGameCoreDLL' with Microsoft Visual C++ 2008 Express Edition

*** YOU ARE DONE ***

Now, the first thing to do is to compile the source code. Click -Build- -Build Solution-. This will begin building, or compiling, the source code. It takes about 20 minutes to do a full compile on my machine.

When the build has completed successfully, you will see this in the last few lines of the ‘Output’ box:

------------------------------------------------------------------------------------------------------
LINK : warning LNK4089: all references to 'KERNEL32.dll' discarded by /OPT:REF

CvGameCoreDLL - 0 error(s), 1 warning(s)

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
------------------------------------------------------------------------------------------------------


You can ignore the harmless LNK4089 warning. Any other warnings should be addressed (errors in your code after you’ve been modding).

A successful build will generate the folder ‘Final_Release’ which is under your CvGameCoreDLL.

In the ‘Final_Release’ folder you will find your freshly baked CvGameCoreDLL.dll file, which you then copy into the \MODS\OriginallDLL\Assets' folder

Now you can start the game. Use the mod 'OriginallDLL' for testing your self-compiled dll.

*** MODDING ***

After you go into the source code and modify it, you’ll need to compile the code, to produce a modified CvGameCoreDLL.dll file. The nice thing is, you’ll only need to compile the files you have changed, so it’s much faster to do a build after changing a couple of files. If you’re like me, you’ll be building .dll’s and testing them regularly. If you’re a REAL programmer, I’d imagine you’d have a good grasp of what code works and what doesn’t just by looking at it. For us novices, the compiler itself will teach you a few things through the errors and warnings it produces when you compile. C++ isn’t easy at first, but there are a lot of resources available on the web and at your local bookstore. One of my favorite links: cplusplus.com. Getting into detail about C++, modding, and best practices are beyond the scope of this post.

Have fun!
 
I can't believe no one has responded to this yet, great guide!

It took me forever to download the Microsoft kit and VC++ but thanks to your guide (and the others of course, DaveMcW, Kael, Maian and Chazcon) I am successfully compiling CvGamecoreDLL.dll while I'm typing this :)

Now I just have to re-learn C++ all over, I really don't like it ^_^. Again thanks.
 
Back
Top Bottom