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

    Phantom48 Chieftain

    Joined:
    Feb 14, 2006
    Messages:
    13
    Location:
    Cleveland, Ohio
    when i do try to do this, doing everything in the first post, with all the programs, i get a folder full of .obj's and CVGAMECOREDLL.layout- how do i get this .dll?:confused:
     
  2. Harre

    Harre Chieftain

    Joined:
    May 10, 2004
    Messages:
    39
    Location:
    Sweden
    The vcproj file specifies the output directory as ../assets so go down up one directory and you'll find it in the directory named assets.
     
  3. Suchy_63

    Suchy_63 Chieftain

    Joined:
    Jun 1, 2004
    Messages:
    10
    Location:
    Montreal
    The dll I got was exactly the same size (in KBs at least, didn't check the bytes) as original. I might play around with it on the weekend to see if there is anything else we can do other than change the compiler.

    And I killed most of the easter weekend to get the walkaround, so there is really nothing to be impressed about :)

    One more thing about this, is that it actually crashes when loading XMLs not Python. If you enable logging, you can see that it crashes somewhere in between CIV4BuildInfos.xml and Units/CIV4UnitInfos.xml
     
  4. Zenious

    Zenious Linux user

    Joined:
    Feb 11, 2006
    Messages:
    73
    Location:
    Indiana, USA
    *Sigh*
    Another error. When I try to build the SDK, an error pops up that says "can't find compiler executable in your search path for Microsoft Visual C++ Toolkit 2003"
     
  5. c.fe

    c.fe Warlord

    Joined:
    Sep 20, 2003
    Messages:
    133
    Location:
    Germany
    Well, i can't guaranty that i didn't change any of the compiler options.

    At least you got something. I was completly confused by the error message and by strange tricks (strange for someone who isn't a c++ veteran) boost used in its source.

    The is unexpected... And again I do not understand it... :crazyeye:
     
  6. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    which one? There's three Windows Server 2003 R2 SDK - March 2006 Edition ISO Download, Windows® Server 2003 R2 Platform SDK ISO Download, Windows® Server 2003 SP1 Platform SDK ISO Install.

    how come they are 100 times bigger than the other file?

    Please help me I am so very confused.
     
  7. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    I noticed that Microsoft replaces the 2003 toolkit. I put up a valid link to it in the first pit.
     
  8. talchas

    talchas Prince

    Joined:
    Jan 3, 2006
    Messages:
    428
  9. Suchy_63

    Suchy_63 Chieftain

    Joined:
    Jun 1, 2004
    Messages:
    10
    Location:
    Montreal
    Did some more research on VC8 and SDK. It appears the crash happens because memory footprint of classes generated by VC71 and VC8 is not identical. In particular, the order of methods in virtual method table generated by VC80 is different from what Civilization executable expects.

    So the only way to make this work with civ4 executable is by recompiling it with VC8 as well. Since this is not possible, we have to use vc71 compiler.
     
  10. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    Since the files are basically text files, you could probably just load each file one by one into another compilier. I'm not sure how compatible a new C++ version DLL (done with 8.0 vs. 7.1) will be, though.
     
  11. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Suchy is speaking of the civ4.EXE which is incompatible with the DLL compiled with vc80. There is no way to recompile the EXE without having the sources of the EXE. But have it for the DLL only.

    So there is no way.
     
  12. dsplaisted

    dsplaisted Chieftain

    Joined:
    Oct 4, 2005
    Messages:
    52
    And there's no switch to compile with the vc71 method? :mad: :mad:
     
  13. d80tb7

    d80tb7 Chieftain

    Joined:
    Feb 6, 2006
    Messages:
    14
    Hello all, just wondering if anybody could help me getting the SDK working in codeblocks.

    I've followed all the steps mentioned in the first post: the main problem I have was that I couldn't get msvcrt.lib and msvcrtd.lib as the link given didn't work for me (It kept saying invalid session). I've installed the .Net runtime, but a search of my system doesn't reveal the files. Eventually I found them in an old copy of VS 6 that I found lying around but seeing as this dates from 1998 I'm not sure whether I've installed the right versions.

    Anyway, when I try to compile I get lots of errors similar to the following:

    _precompile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)

    Does this look like it's something that could be caused by an incorrect version of msvcrt.lib and if so where's the best place to look for it (I'm currently downloading the .Net sdk to see if it is in there). If not, any other clues to what I'm doing wrong would be much appreciated.

    Thanks,

    Chris
     
  14. A Silly Goose

    A Silly Goose Goose of Silliness

    Joined:
    Jan 15, 2006
    Messages:
    157
    Location:
    South Carolina, USA
    Since it boils down to the dreaded .exe, I guess that'd mean the only ways to get a working version out of VS8 would be to either: trick VS8 into using the 7.1 compiler somehow; or hope that Firaxis incorporates some kind of "fix" for this likely-unforeseen issue, whether it be as a patch or a part of the Warlords expansion.

    Unfortunately, I can't really say if either is even possible, much less likely. Chances are that we'll have to use another IDE (like CodeBlocks) to get the job done. It's really too bad, now that the software is freely available not until November, but permanently (see question 11 in their FAQ).
     
  15. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    Same problem here!
    I followed the instructions in post #1 of this thread an use the codeblock editor with the MSVC++ Toolokit 2003 compiler. The linker says: "cannot open file 'msvcprtd.lib'"

    Can you tell me how to do this? I cannot find the option to exclude a library.

    Matze
     
  16. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Do you have a msvcprtd.lib file in your 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib' directory?
     
  17. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    Of cause not. This file is not freely distributed by Microsoft.
    But mjs0 was talking about the linker option "Multi-Threaded DLL Runtime Library [/MD]", which should not use the msvcprtd.lib but the msvcprt.lib, which is delivered with the toolkit.
    Switching on that linker option did not solve the problem, because the linker still searches the msvcprtd.lib.
    He solved that problem by manually excluding the msvcprtd.lib, but didn't tell us, how.

    Matze
     
  18. dlordmagic

    dlordmagic Warlord

    Joined:
    Nov 24, 2005
    Messages:
    103
    Location:
    South Carolina
    If you downloaded all the components which include VC++ toolkit 2003,platform SDK, the 3 libraries msvcprt, msvcrt, and msvcrtd and codeblocks. After you have installed the VC++ toolkit 2003 place the three library files into the C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib folder. After that its about setting up codeblocks. All of these components can be found in the 1st post before the picture diagrams. If this doesnt work you most likely didnt get the library files.
     
  19. dlordmagic

    dlordmagic Warlord

    Joined:
    Nov 24, 2005
    Messages:
    103
    Location:
    South Carolina
    I got the same thing while I was using the Aol browser, minimize your current browser (dont close as that will disconnect you from the internet) open up internet exlplorer( the msn browser will pop up). go to the civfanatics website from the MSN browser. Follow the links back to this thread and try to download the file again. You should have no problem this time.
     
  20. dlordmagic

    dlordmagic Warlord

    Joined:
    Nov 24, 2005
    Messages:
    103
    Location:
    South Carolina
    The name of the file is CvGameCoreDLL.vcproj. If you cant see the full extension. You will need to select Tools then Folder options and then View. Scroll down and uncheck the Hide extensions for known file types box.
    You should now be able to view all the files with all there extensions.
    then up the file listed above.
     

Share This Page