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. Jimmyh

    Jimmyh Prince

    Joined:
    Nov 20, 2001
    Messages:
    452
    Location:
    Sheffield

    Is the updated SDK only released with the Warlords expansion?
     
  2. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    It is on the Warlords CD.

    Matze
     
  3. Déja

    Déja Beyond the Mod

    Joined:
    Dec 19, 2005
    Messages:
    353
    Correct. 2.00 is Warlords only (found on the Warlords CD) and 1.61 is the last version that Firaxis plans to release for the vanilla game (which is great for modders because now we don't have to worry about updating our mods for a new patch).
     
  4. Zebra 9

    Zebra 9 Emperor

    Joined:
    May 17, 2006
    Messages:
    1,554
    Location:
    Middle of Cyberspace
    I've gota bit of a problem. When I try to instal the Platform SDK it can't find some files. What is it I'm doing wrong?

    P.S
    I guess this will sound stupid, but I have no clue what I'm supposed to do w/ the LIBs.

    Someone. Anyone Please Help.
     
  5. Raion

    Raion Chieftain

    Joined:
    May 10, 2006
    Messages:
    78
    The Platform SDK or the IDE Environment of the programming program?
    It is not clear what you can not find. If the correct Platform SDK was downloaded and the download is not corrupt (when various viruses go around the Internet and have to be removed first to have the computer working correctly) then with the August 2005 SDK needed to Mod this game which works both with Win2K and WinXP, then you have to include the PATH to find those files in the IDE of the programming program. Codeblocks you have to follow the directions in the first post about that, and with other IDE, you include the PATH to the SDK in the Environment Settings of the programming program. That means that since you are using this particular Platform SDK the PATH to the files must be first so the program find those files first to build the program. Then if the programming compiler can not find what files it needs to build the program then it looks in the other PATHs listed when the program was installed.
    The Include Directory (folder) includes the *.h files needed to be read. The Lib Directory (Library folder) includes the Library files needed by the program, and the Bin (binary Directory) includes the Binary files the programming program needs to find to build the program attempting to be built as in the Civ4GameCore.dll file.
    This sometimes mean that if you have a particular OS on your computer, you must install the Platform SDK for your computer OS which Microsoft may make a little complicated but really is not. There should be an install file and you have to follow the instructions included with the readme file to determine what commands to give the program so it installs on your computer correctly.

    When I am running Windows 2K I am not installing the SDK for Windows XP. There is a batch file that is included to be ran, and usually it is automatic in a sense, but if you want to make sure, then you have to do some reading about installing the Platform SDK which is included with that. Wherever you put the Platform SDK it does not have to be where the programming program is located. I have mine on a different logical partition (drive letter) and then within the programming program, I include the PATH to where it is located.
    If I have the Platform SDK in H:\Microsoft Platform SDK then within that main directory (folder) is where the sub folders are located. There is usually a bit more folders than what you need in the Environment of the programing program IDE. But the three folders will be included : That being \bin folder, and the \include folder and the \lib folder. Those go in certain places so the linker and compiler part of the programming program can find what it needs in those folders.
    If you are including the *.h files in the Platform SDK those are in the \include folder of the SDK. If you are buildling (compiling the program) the \lib folder is needed to build the program. If you are programming something different in the SDK of the game vs. using the Platform SDK to do it all with, then the \bin folder is the one needed. There are divisions in any programming program, and you should know what it is you are doing or follow the instructions in the first post and make sure you are doing that correctly.
    If not, it will not work.
     
  6. Zebra 9

    Zebra 9 Emperor

    Joined:
    May 17, 2006
    Messages:
    1,554
    Location:
    Middle of Cyberspace
    Well my problem is that when I run the instal exe for the Platform SDK, it can't find some certain files.

    Now your saying copy the libs into the lib directory?
     
  7. Scilly_guy

    Scilly_guy Prince

    Joined:
    Nov 13, 2006
    Messages:
    403
    God this is a long thread, I started at the begining and tried to find someone asking the same as me, I did a few searches and I got nothing that seemed relevant, probably because everyone else managed to figure it out for themselves, if so that is good because now you can help me.

    I have Visual Studio .NET 2003 (Microsoft Visual C++.NET 2003), I've made sure all the files in the SDK are NOT set to read only, it compiles fine, well at least I don't get any errors, it is just producing 5 files called CvGameDLL, as you would expect there is .lib, .pdb, .pch and .obj, there is also .exp, however I do not get a .dll !

    I have tried following the instructions to get it working the free way but I dont get the option to open a .vcproj in CodeBlocks. I have also tried setting the config manager and project properties to final release in VS and it claims the linker should output ../Assets/CvGameCoreDLL.dll.

    SO WHAT THE HELL IS GOING ON???


    Edit: Right its official, I AM a muppet, I answer my own question and make myself look like a noob, like I said the file is in ../Assets, theres my problem.
     
  8. Rod

    Rod King

    Joined:
    Sep 22, 2004
    Messages:
    754
    Location:
    Munich / Germany
    hello

    can you just post your changes in case somebody else encounters a similiar problem ?
    btw is the warlords sdk of the vanilla version (on cd) and the 2.08 patch version identically ?
     
  9. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    First, the vanilla version had no SDK on it's DVD, the SDK came with patch 1.61 for download.
    This was the one and only SDK for vanilla.
    Second, there is a SDK on the Warlords CD which is very different from the vanilla SDK.
    And third, the Warlords SDK was also updatet with patch 2.08, so it's different from 2.00.

    Matze
     
  10. Rod

    Rod King

    Joined:
    Sep 22, 2004
    Messages:
    754
    Location:
    Munich / Germany

    sorry for my confusing question. I was of course asking whether the SDK of the unpatched warlords addon is identically with the sdk of the patched 2.08 warlords addon. I used the vanilla term wrongly and I was never referring to the civ1.61 sdk.

    In anyway as the we need now a new sdk for the patched warlords version .. is there already any progress ?
     
  11. Rod

    Rod King

    Joined:
    Sep 22, 2004
    Messages:
    754
    Location:
    Munich / Germany
    Hello,

    I finally managed to install all the vc++ toolkit 2003 , the codeblocks, the microsoft platform sdk etc.

    Now when I compiled the Vanilla Civ1.61 Sdk for testing i encountered following error. Already for two nights i am tinkering around , but no glue.

    Edit : At first I need to thank Kael and to Gordon. They had the right ideas. Such errors occur, if you miss out a lib folder in the respective directory AND do not set the Final Release. In this case a mention. I also had to change the target directory for Final Release, because the problem was that codeblocks was always searching for a folder Final Release|Win32 (Projects->Properties->Target)
    So I keep this now an example for other people that maybe have a similiar problem

     
  12. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    No, we don't. The patch also updates the SDK.

    Matze
     
  13. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Im not sure. From your screenshot it doesn't look like step 9 was done to change the build target to Final Release. I would check through all the steps in the first post and make sure they done correctly, I wish it was simpliar than it is but there is a lot of little adjustments in those steps that can be easy to miss.
     
  14. gordonthewhale

    gordonthewhale Chieftain

    Joined:
    Jan 8, 2006
    Messages:
    33
    Location:
    Oklahoma, USA
    Another thing to make sure of is that you've selected the VC++ Toolkit as your compiler, and added the Microsoft Platform SDK libraries. All that is is the instructions. As Kael said, just go over them and make sure you've done every single little thing.
     
  15. Spocko

    Spocko Warlord

    Joined:
    Dec 18, 2005
    Messages:
    168
    Location:
    Dover, New Hampshire
    Sorry to sound like such a noob, but which file on the Warlords CD is the SDK? In the past, I've obtained (and subsequently tweaked and successfully compiled) the SDK after having downloaded a file from the web. I followed a link, downloaded a very big file, and voila, I have SDK without having to know anything about the filename.

    To clarify, I downloaded the magic SDK file and saved it into a directory far away from the Civ4 directories - just so, as a noob, I would not accidentally overwrite something critical while I tweaked away at the SDK. Once I finished my tweaks, I'd just copy the dll over to my mod's assets folder and run it (with great success).

    So, to recreate this wonderfully simple experience in finding the SDK for Warlords 2.08, is there a place on the web I can download it?

    Thanks for your help.
    Spocko
     
  16. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    Having fun with SDK modding (no sleep, no hair, no shower for 14 days)

    just kidding

    But a question: Is there a way to setup Code::Blocks so that we don't have to perform step 8 in your tutorial each time? Like, a default setup.

    Or rather, if I save the project per step 9, and then change .h and/or .cpp files, will opening the same project again work during compile?
     
  17. DaveMcW

    DaveMcW Deity

    Joined:
    Oct 8, 2002
    Messages:
    6,489
    Yes. After you reload the .cbp project, you can jump right to Step 11.

    The only reason to re-save the project is if you add new files.
     
  18. Anthraxus899

    Anthraxus899 Chieftain

    Joined:
    Sep 23, 2006
    Messages:
    35
    CvGameCoreDLL.cpp
    cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
    cl : Command line warning D4027 : source file 'EHsc' ignored

    Erm... What did I do wrong and how can I fix it?
     
  19. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Did you follow step 8 to change EHsc to /EHsc?
     
  20. Anthraxus899

    Anthraxus899 Chieftain

    Joined:
    Sep 23, 2006
    Messages:
    35
    I put /EHsc, and there was no EHsc to begin with. Edit: Nvm, found it, was a ******** mistake on my part, was filling in the wrong area.
     

Share This Page