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

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    I have an Intel Core 2 Duo P8400, so I was puzzled when the ia64 file didn't run. So I just thought "here goes nothing" and tried the amd64 one - and that worked, go figure...

    EDIT: Hey Kailric, great to see you back! If you manage to finish the supply line mod, I'm still very interested! :)
     
  2. Flying Pig

    Flying Pig Utrinque Paratus

    Joined:
    Jan 24, 2009
    Messages:
    15,651
    Gender:
    Male
    Location:
    Perfidious Albion
    Can you use visual c++ to compile?
     
  3. Refar

    Refar Deity

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    If you have VC++ 2003 you can. (Assuming that by visual c++ you mean the full version of MS Visual Studio).
    On any other version the same (in principle) procedure / tools as described here must be applied. The principle being: Compiling on VC++ Tollkit 2003 via Makefile and replacing the Codeblocks by whatever Editor/IDE you prefer. See my Signature as well as this (the one you are reading right now) and this (focusing on VC++ 200* Express Edition) thread.
     
  4. Bangra 7

    Bangra 7 The Port Of Call

    Joined:
    Aug 28, 2008
    Messages:
    213
    Gender:
    Male
    Location:
    Raleigh, North Carolina
    Thank you very much.
     
  5. Flying Pig

    Flying Pig Utrinque Paratus

    Joined:
    Jan 24, 2009
    Messages:
    15,651
    Gender:
    Male
    Location:
    Perfidious Albion
    I'm using Visual C++ 2008 as on the website now, does that work?
     
  6. Kalimakhus

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    @Flying Pig

    It works. You will need to follow the same steps as per Refar's PDF. You will not need to download the PSDK as it comes bundled with VC++ 2008. You should replace the reference to the PSDK folder in the makefile with the one that comes with VC++ 2008.
     
  7. Flying Pig

    Flying Pig Utrinque Paratus

    Joined:
    Jan 24, 2009
    Messages:
    15,651
    Gender:
    Male
    Location:
    Perfidious Albion
    Thanks for that, very useful.
     
  8. Trojan Sheep

    Trojan Sheep Chu Bosu

    Joined:
    Nov 18, 2005
    Messages:
    173
    EDIT: Never mind :p
     
  9. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
    Having a problem with step 7

    7: Open \CvGameCoreDLL\CvGameCoreDLL.vcproj in CodeBlocks.

    vcproj isn't assigned to anything. It asked me how I wanted to open it, I choose in codeblocks, and it shows up as text, not as a project.

    I have removed the assigned vcproj just fine, but it still won't open as a project.

    Figured out my error, there were two similar files. I am loading the FFH source.
     
  10. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    which platform SDK should I use if I'm running Vista x64? Microsoft Platform SDK for Windows Server 2003 R2 won't install - says it's not compatible.
     
  11. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
  12. draco963

    draco963 Prince

    Joined:
    Jan 26, 2007
    Messages:
    448
    Location:
    Ottawa
    EDIT: ugh, I'm an idiot... Just read Refar's sig, duh! ;)

    umm...

    I had to do an OSRI, and so need to start from scratch again for editing the SDK.

    All links for VC++ Toolkit 2003 are dead though, the MSDN doesn't host it anymore. And Googling didn't work either. Could someone upload the file here? Or does anyone have a working link?

    Thanks...
     
  13. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North

    As it turns out, I can use the platform SDK v6.1 - in order to get it to work I had to factor in a new path for search directories and linker.

    From the opening post (my additions in bold):

    Hopefully that helps some people out
     
  14. Quornix

    Quornix Warlord

    Joined:
    Dec 27, 2006
    Messages:
    134
    Hi. It's been a while since I've been modding Civ IV, and I'm now on a new computer with Vista. I'm using Visual C++ 2008 Express (used 2005 last time, IIRC), and have followed the instructions. Had a couple of errors along the way that I cleared up (I fixed the wrong Makefile, and wound up starting a new project after the first issues).

    Unfortunately, I'm now getting an error:

    >c:\Users\Space Hamster\Desktop\Civ IV BTS SDK Mods\CvGameCoreDLL\CvGameCoreDLL.h(160) : fatal error C1083: Cannot open include file: 'boost/python/list.hpp': No such file or directory
    1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2'

    So I tried to use "Add Existing Item..." to include the folder. It doesn't like to include folders. So I started adding in files manually. Now not only does it not give me any message if I add the same file more than once, making me worry about the files with the same name, and not only are there more directories than seems sane (I'm currently at Boost-1.32.0\include\boost\spirit\phoenix, whatever that is), but I'm quite sure that I didn't do this last time. I know it's wrong, but at this point, I feel the need to complete my mission.

    So, if someone could let me know what I'm supposed to do, I'll check here again when it fails after all this effort. Thanks!

    EDIT: Aargh. There wasn't far to go after that point, and I just realized that when I fixed the wrong Makefile, I fixed the one that I downloaded (in the wrong place). I was using the original on my second try! It seems to be compiling, so wish me luck.

    EDIT2: And success!
     
  15. Tholish

    Tholish Emperor

    Joined:
    Jul 5, 2002
    Messages:
    1,344
    Location:
    Japan
    I followed the instructions in the first post and installed code blocks and the SDK and now I want to compile a modcomp. The dll compiles, but at the end of the process I get this error message about the debugger running out of memory. So I disabled the debugger and it still happens.
     

    Attached Files:

  16. Grave

    Grave 1 Goat = 400 Horses

    Joined:
    May 5, 2002
    Messages:
    1,530
    Location:
    Louisiana
    Ok, so does anybody have an idea on what a modder needs to do in order to make their DLL file "Vista compatible?"

    I'm having this issue right now... History in the Making works flawlessly in Windows XP. Vista users get constant CTDs. Since I'm not a seasoned code monkey, I'm not sure exactly what I need to do in order to fix the CTDs.

    Any suggestions?
     
  17. PiMan

    PiMan Emperor

    Joined:
    Oct 1, 2008
    Messages:
    1,995
    Location:
    Melbourne, Australia
    I've looked through the entire topic, and found people with the same errors I'm getting, but none of the solutions given solve my problem.
    I'm using code::blocks and have followed the instructions in the initial post to the best of my ability.

    The first error I get is this:
    Code:
    cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
    CvGameCoreUtils.cpp
    cl : Command line warning D4027 : source file 'EHsc' ignored
    
    And I get this for most if not all .cpp files

    I also get this:
    Code:
    ||=== CvGameCoreDLL, Debug Win32 ===|
    c:\program files\Microsoft Visual C++ Toolkit 2003\include\memory|498|fatal error C1067: compiler limit : debug information module size exceeded|
    ||=== Build finished: 1 errors, 0 warnings ===|
    
    Just to make sure I don't get redundant advice, I have changed EHsc to /EHsc, so that isn't the problem.

    May be relevant, but I doubt it: I'm using Code::Blocks version 8.02 and Civ IV: Col version 1.01f
     
  18. Kalimakhus

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    Concerning the second error you get.. Did you do this:
    "On the "Compiler Flags" tab, uncheck "Produce debugging symbols [/Zi]"."

    About the first issue.. It still seems that your compiler command lines include EHsc without '/'. To make sure that this is not the case you may look at the makefile that Code::Blocks has created for you. It should be listed in the project's files list.

    For an alternative way to build the C4C DLL you may like to look here: http://forums.civfanatics.com/showthread.php?t=294243
    I recommend using VS2008 or 2005 because both IDEs are much more powerful than Cod::Blocks while being more user-friendly. Additionally both allow you to debug your DLL which is something you will end-up needing if you intend to do serious SDK changes.
     
  19. PiMan

    PiMan Emperor

    Joined:
    Oct 1, 2008
    Messages:
    1,995
    Location:
    Melbourne, Australia
    [/Zi /D_DEBUG] wasn't checked by default for some reason. Just to be sure, I checked and unchecked it, and I deleted /Zi from the next screen (the "Other options" tab) all when I first attempted to compile the code.


    And I can't seem to find the makefile.

    EDIT: I found the problem. In the Build menu, under "Select Target >" I had a debug option selected and I'm not sure why. Changed to Final Release and everything is compiling fine so far.
     
  20. Mylon

    Mylon Amateur Game Designer

    Joined:
    Nov 4, 2005
    Messages:
    1,013
    I've been banging my head trying to make this work. I can get the "release" to compile, but when I try to compile the final release, it gives me this error:

    LINK||fatal error LNK1181: cannot open input file 'Release.obj'|

    There is no release.obj file being created, so this owuld be why it can't open the file.

    On the plus side, the release file seems to work just fine. Time to let my fans beta test!
     

Share This Page