1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Installing and using the SDK

Discussion in 'Civ4 - Creation & Customization' started by Kael, Apr 13, 2006.

  1. WildWeazel

    WildWeazel hard-coded Supporter

    Joined:
    Jul 14, 2003
    Messages:
    6,967
    Location:
    %CIV3%\Conquests\Scenarios\
    Thanks for the info Kael!
     
  2. IrishDragon

    IrishDragon Legend

    Joined:
    Mar 1, 2006
    Messages:
    443
    Is there any other way than downloading C+
     
  3. Sevo

    Sevo Leaf on the Wind

    Joined:
    Nov 26, 2005
    Messages:
    511
    Location:
    Chicago, IL
    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...
     
  4. IVZanIV

    IVZanIV Warlord

    Joined:
    Jan 14, 2006
    Messages:
    285
    I am trying to install the Platform SDK, but I keep getting an error... It won't install it... Any ideas?
     
  5. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Whats the error?
     
  6. IVZanIV

    IVZanIV Warlord

    Joined:
    Jan 14, 2006
    Messages:
    285
    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...
     
  7. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    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...
     
  8. Oni

    Oni Machiavelli

    Joined:
    Jun 23, 2004
    Messages:
    192
    Location:
    US
    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

     
  9. IVZanIV

    IVZanIV Warlord

    Joined:
    Jan 14, 2006
    Messages:
    285
    ^ I get the same error there, but with those files, w/o the SDK for the coding thing...
     
  10. A Silly Goose

    A Silly Goose Goose of Silliness

    Joined:
    Jan 15, 2006
    Messages:
    157
    Location:
    South Carolina, USA
  11. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    They are in a .rar file that you download via that link in the Walkthrough. You need to unpack it to the correct folder.
     
  12. Oni

    Oni Machiavelli

    Joined:
    Jun 23, 2004
    Messages:
    192
    Location:
    US
    OK yeah I got those lib files now...
    Still getting the error for no "windows.h" file
    any ideas?
     
  13. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    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.
     
  14. Bill3000

    Bill3000 OOOH NOOOOOOO! Supporter

    Joined:
    Oct 31, 2005
    Messages:
    18,464
    Location:
    Quinquagesimusermia
    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.
     
  15. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    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.
     
  16. vbraun

    vbraun Raytracing

    Joined:
    Jul 7, 2003
    Messages:
    3,530
    Location:
    Arizona, USA
    It won't compile using that, otherwise that would of been mentioned in the first post. ;)
     
  17. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    Im getting this error too...
     
  18. A Silly Goose

    A Silly Goose Goose of Silliness

    Joined:
    Jan 15, 2006
    Messages:
    157
    Location:
    South Carolina, USA
    ...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
     
  19. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.

    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
     
  20. c.fe

    c.fe Warlord

    Joined:
    Sep 20, 2003
    Messages:
    133
    Location:
    Germany
    You are right, that is indeed possible. :)

    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 ;) ).
     

Share This Page