Installing and using the SDK

RogerBacon said:
Now that I'm looking at the files I realize it's been about 5 years since I did an yserious C++ programming. This is going to take awhile. :yuck:
Roger Bacon

I hear that, RB. Been a lot of PERL, lately a lot of Python...last C++ app I hammered out was prolly 8+ years ago now...

Well, it's little "projects" like this that keep our skills up, right? (by "project", I mean all-encompassing obsession that goes on despite shutdown of core social skills, daily activities, and basic hygiene)

Thanks for the help, Kael. Much appreciated. Just gotta go find VC...
 
I am trying to install the Platform SDK, but I keep getting an error... It won't install it... Any ideas?
 
IVZanIV said:
I am trying to install the Platform SDK, but I keep getting an error... It won't install it... Any ideas?

Whats the error?
 
It's a really long error and I didn't write it down, I can get it for you tomorrow, but I DO know that it occured on the same file each time, something to do with the \help\ file...
 
I get this error when I try to install codeblock:



I get this error on all installations based on the Innosetup Installer

Anyone else not able to use installations based on it? (Freemind is another program that uses it).

And anyone that knows how to fix that error? To install Freemind I had to install it on another computer and copy the installed folder to my computer. And of course this wont work on all programs...
 
Having problems with step 2.. specifically where are
msvcrt.lib and msvcrtd.lib

And I am hoping this is what is causing this error in the final build->build

Build Log said:
CvArea.cpp
c:\Program Files\Firaxis Games\Sid Meier's Civilization 4\CvGameCoreDLL_v161\CvGameCoreDLL\CvGameCoreDLL.h(15) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Process terminated with status 1 (0 minutes, 4 seconds)
1 errors, 0 warnings
 
^ I get the same error there, but with those files, w/o the SDK for the coding thing...
 
Oni said:
Having problems with step 2.. specifically where are
msvcrt.lib and msvcrtd.lib

And I am hoping this is what is causing this error in the final build->build

They are in a .rar file that you download via that link in the Walkthrough. You need to unpack it to the correct folder.
 
OK yeah I got those lib files now...
Still getting the error for no "windows.h" file
any ideas?
 
Grey Fox said:
I get this error when I try to install codeblock:



I get this error on all installations based on the Innosetup Installer

Anyone else not able to use installations based on it? (Freemind is another program that uses it).

And anyone that knows how to fix that error? To install Freemind I had to install it on another computer and copy the installed folder to my computer. And of course this wont work on all programs...

Ok, I've solved the problem.

Seems like I wasnt logged in as the Administrator, I thought I had Administrative rights on my logged in user though. Anyways, works to install it when I use Run As..., and use the Admin with the correct psw.
 
A Silly Goose said:
Yaknow, Microsoft is currently offering the entirety of Visual Studio 2005 Express as a free download...

I think that doesn't have support for DLLs, not exactly sure. Besides, this was coded in VS 2003, not 2005 - I heard that 2005 gives compiler errors.
 
Some basics of classes:

Classes in C++ are divided into two parts:

header (.h)
Class (.cpp)

Functions look like this:

int someFunction(int somethingelse)
{
.
.
.
return somevar;
}

If you want to jump right into the code, and change existing code, then the .cpp (class) file is all you'll need. You'll see a lot of boolean type functions (like isXYZ). Those have return statements. Try putting a return true (or false) on the first line (after the { bracket). Compile it (it takes a few minutes), then replace the new dll with the old CvCoreDLL file. (make a backup first!)

The best way to go about learning it is to fiddle around with the global variables (varibles at the top of the code - usually in all caps), or finding a function like "isWhatever", and returning a true or false value.

I find the AI and City file to be the most fun to play with.

Note: For the AI, you'll see stuff like:

somevar += someFunctionForReligion();
somevar += someFunctionForCivics();
.
.
.

Those are weights that make the AI decide if it wants to do something.

Well, that's a really quick tutorial before I call it a night.
 
vbraun said:
It won't compile using that, otherwise that would of been mentioned in the first post. ;)

...Yeah, I guess I didn't read some of the thread carefully enough, heh.

Maybe Firaxis will eventually come up with something that'll allow for some level of compatibility with 2005 editions--or maybe something from Microsoft? ...Yeah, better not hold my breath :p
 
If you want to jump right into the code, and change existing code, then the .cpp (class) file is all you'll need. You'll see a lot of boolean type functions (like isXYZ). Those have return statements. Try putting a return true (or false) on the first line (after the { bracket). Compile it (it takes a few minutes), then replace the new dll with the old CvCoreDLL file. (make a backup first!)


Are you sure it is neccesary to replace the CvGameCoreDLL.dll? I was thinking it would be theoretically possible to just place your new .dll into your mod's Asset folder.


EDIT: Another question... How do you get this compiler to not be read only? I cannot edit anything at present for some reason and since I've never used this program... I have no idea how to turn it off. :p
 
Agent 009 said:
Are you sure it is neccesary to replace the CvGameCoreDLL.dll? I was thinking it would be theoretically possible to just place your new .dll into your mod's Asset folder.

You are right, that is indeed possible. :)

Agent 009 said:
EDIT: Another question... How do you get this compiler to not be read only? I cannot edit anything at present for some reason and since I've never used this program... I have no idea how to turn it off. :p

When I extracted the source files they were all marked as read only. So it had nothing to do with CodeBlocks, you just had to "turn off" the read only with the explorer (or cmd, if you like ;) ).
 
Top Bottom