Installing and using the SDK

Do you have the Windows Platform SDK installed and is it set in the search path of your build system.

Details of how your build system can find the included headers depends on what system you use. Do you use VS2005 with the provided makefile? In this case the upper line in the make file should point to the root folder of the PSDK. Setting things in code blocks is different but even easier.
 
the SDK lets you mod everything, right?

Well, define everything ;)

So many things can be moded with editing XML files only. You can add as many units, buildings, civs, promotions, ...etc. without touching the DLL or Python files.

Some elaborate change over of the game like Front Frontier depends almost entirely on Python + XML. BTW there are a couple of things that were modified for them in the default DLL.

In general XML lets you change "What" you have. Python lets you change "How" it works. SDK allows you to change even the rules and add new ones.

For example. You can add a new unit with XML alone. But to add a new mission like establishing a trade route, you will need some DLL coding.
 
I have the Microsoft Platform SDK for Windows Server 2003 R2 installed and it is in the compiler directories, if that's what you mean by the search path. I'm using Microsoft Visual Toolkit C++ 2003 if that helps.
 
The compiler sure doesn't have the correct path of the platform SDK. Otherwise it would have found windows.h.

Do you use code blocks? or the makefile with visual studio 2005?

In code blocks the include directories should has an entry to the include directory under the platform SDK (not the root).
C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/include

In the makfile there is a variable that points to the (root) of the platform SDK.

it looks like this:

PSDK=C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2
 
I can't figure out how to configure Codeblocks to work. VC++ 2003 is no longer available, so I'm using 2005. Currently it says windows.h is not available?

Edit: I think I figured it out. I had to not only install the WinXP SDK (or maybe I didn't) and run the command to set the paths, I also had to restart Codeblocks. Go figure my multitasking wouldn't refresh the memory like Codeblocks needs.
 
Oh lovely. I wasted a few hours configuring the thing so it actually points out errors in my code rather than giving me other problems and now I'm told this?

So why is it so hard to compile this DLL, anyway?
 
It is not that hard. You only need to have the right tools. Civ4 executable files and DLLs were all linked with the libraries that come with VS 2003. Any DLL that need to work with them has to be linked with the same libraries. There is a VS2003 toolkit download available in the civFanatic DB. You will need this as well as the Platform SDK (I think you have it already). You can then set CodeBlocks to use the compiler and linker that come with the toolkit.

There is a detailed step by step tutorial for the process in the reference and tutorials forum.
 
But how do you compile dll's???
 
oh...nvm didn't read above post
 
It is not that hard. You only need to have the right tools. Civ4 executable files and DLLs were all linked with the libraries that come with VS 2003. Any DLL that need to work with them has to be linked with the same libraries. There is a VS2003 toolkit download available in the civFanatic DB. You will need this as well as the Platform SDK (I think you have it already). You can then set CodeBlocks to use the compiler and linker that come with the toolkit.

There is a detailed step by step tutorial for the process in the reference and tutorials forum.

You say it's not that hard, but the task does require a specific compiler which is no longer available from the original source which pretty much requires a front end GUI and a few more libraries not included in the toolkit. And I still couldn't get it to compile.

And this isn't counting the hours I spent trying to set up the wrong compiler to do the job.
 
Mylon..!!

Cheer-up man. What will be the case when you set everything quite well and build the DLL successfully , then put it into a mod just to get the game crash on you. Well it will happen when you start adding stuff and trying them. You may spend hours searching for a cause till you stumble on some little silly error you made. This is how it is. Nothing is really easy still nothing is too hard.

You already have most of the required stuff. If you have downloaded the platform SDK no other download should seem big for you. Go get this toolkit and the 2 library files. Go through the steps in the tutorial and acquire the satisfaction of accomplishing something that you worked hard for.

Edit: Sorry I am not sure I read your post carefully. So have you got the toolkit already? If it is still not working for you just revise the steps carefully and see if you forgot to add some path here or there in CodeBlocks. Sometimes it is really small things (a miss-spelled word or a missing slash).
 
I have 1 q, how big is the Platform SDK? I tried getting it before but it never seemed to get anywhere (I've got dial up).
 
@Zepra 9

Well, I guess you shouldn't try downloading it. It is quite huge (the official release). In fact you don't really need all the stuff that comes with it. There are actually two folders that you need (includes and lib ones). I don't know if it is legal to post a lite version with the needed stuff only.

On the other hand I think Code Blocks have a Win32 API package that is much smaller than the PSDK. You should however make sure it is compatible with MS compiler and linker.
 
Could somone please direct me to the smallest possible solution to compiling civs SDK? I have no clue what you mean by these words (ie. linker, Win32 API). :cry:
 
Zebra 9..

Following links in your signature I can see that you are already able to work with Python very well. Sure modding XML files is not a problem for you either. Now the SDK is in C++. This is considered by many to be the most powerful programming language. Is it complicated? Yes it is. Is it impossible to learn? Not at all. You can learn C++. You can work with civ4 SDK. But trying to find some short cut to do it won't help.

Now, I am sure you have gone through the tutorials in the forum explaining how to use free tools to (Build) the DLL. I think all othese tutorials are quite simple. But you need to get the required stuff before trying any of them.

If you really want it so bad then a long download won't bother you that much. I have left my PC downloading stuff before for several days. With a reliable download manager you can just leave it working as long as needed.

Go download the needed stuff as mentioned in any of the tutorials. If then you have a problem in following the steps I will be glad to help as well as many others around here.
 
Back
Top Bottom