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

    Rod King

    Joined:
    Sep 22, 2004
    Messages:
    754
    Location:
    Munich / Germany
    Yes, I had the same thing . just for everybody else :

    the EHsc that needs to be replaced is in : Project -> Build Options, not in Settings.
     
  2. Spocko

    Spocko Warlord

    Joined:
    Dec 18, 2005
    Messages:
    168
    Location:
    Dover, New Hampshire
    For those of you following along at home, I of course found it in the CvGameCoreDLL folder...

    C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Warlords\CvGameCoreDLL

    Back in business.
    Spocko
     
  3. Spocko

    Spocko Warlord

    Joined:
    Dec 18, 2005
    Messages:
    168
    Location:
    Dover, New Hampshire
    Talchas,
    Do you mean that setting these options reduced the size of the CvGameCoreDLL.dll?

    If so, where are these options posted to CodeBlocks? Perhaps Project Build Options > Final Release > "Other Linker Options" tab?

    Thanks!
    Spocko
     
  4. Rod

    Rod King

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

    and another problem :



    and the Build Log of the same problem :



    I checked the steps and the build is starting very properly but then I get this memory error.
     
  5. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    I dont know why you have CvGameCoreDLL.chp and memory files open.

    In your workspace you should have a Sources folder full of .cpp files and a Headers folder full of .h files. It seems like you may have some files in your project that aren't supposed to be there.
     
  6. gordonthewhale

    gordonthewhale Chieftain

    Joined:
    Jan 8, 2006
    Messages:
    33
    Location:
    Oklahoma, USA
    I had that error once. Go to Project->Build Options. Select "Final Release" from the menu on the left. Make sure that the first check box, "Produce Debugging Symbols [/Zi /D _DEBUG]" is NOT checked.
     
  7. talchas

    talchas Prince

    Joined:
    Jan 3, 2006
    Messages:
    428
    Yes, I think thats what it was.
    I don't really remember, but that sounds about right. Give it a try.
     
  8. pauluslupus

    pauluslupus Chieftain

    Joined:
    Nov 29, 2004
    Messages:
    21
    Location:
    Prešov, Slovensko
    Thanx DaveMcW, your file fatal_error_C1067_FIX.zip helped.
    PL
     
  9. pauluslupus

    pauluslupus Chieftain

    Joined:
    Nov 29, 2004
    Messages:
    21
    Location:
    Prešov, Slovensko
    Thats it, I have also realized it after reading your post, that it is necessary to choose "final release".
    PL
     
  10. Rod

    Rod King

    Joined:
    Sep 22, 2004
    Messages:
    754
    Location:
    Munich / Germany
    Hello the solution for these problems is (like gordon mentioned) that in build options you not only have to uncheck the debugging, but on the screen where you change the EHsc into /Ehsc you will also find /Zi. This has to be deleted to .
     
  11. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    I understand that Civ 4 was written for and compiled in MS Visual Studio C++ .NET 2003, correct?

    And that because of compiler inconsistencies we cannot edit the SDK nor compile it using Visual Studio C++ 2005 Express?

    Is there any workaround to this? I'd much rather work in VS than Code::Blocks.

    Thanks for any helpful hints.
     
  12. seady

    seady Prince

    Joined:
    Aug 30, 2006
    Messages:
    582
    Location:
    Sydney
    To me, that's the problem with using a proprietary language ... today's edition is incompatible with tomorrows, not because it has to be, but because otherwise you wouldn't buy the next version, and the next one, and the next one... you have to keep running to stay in place. That is my impression, at least.
     
  13. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    Umm well...it's not a proprietary language, it's the most common language on the planet. C++ compiler inconsistencies are well-documented.

    It's just that Firaxis wrote Civ4 in v.2003 probably because that was the latest release at that moment (2005 was probably still in development or beta at the time). And now 2005 compiles differently than 2003 if I understand correctly.

    But surely there's a workaround, anyone?
     
  14. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    YES!! THANK THE GOOD LORD! I got this workaround going, compiled and tested a .dll, and it's wonderful.

    Thanks a million for this!

    ------------------------------------------------------------------------------------------------------------------

    EDIT: OK after spending a few hours on Visual C++ 2005 Express, and having spent 50+ hours on Code::Blocks, I have to tell you all the difference brings tears to my eyes. The Microsoft product is LIGHT YEARS ahead of Code::Blocks. It's faster, simpler, easier, much more powerful and intuitive than the other. And it's FREE as well. You'll get more done and have less headache. Do yourself a favor.

    I suggest the first post be edited and replaced with Maian's procedure for using the 2003 Toolkit with MS Visual C++ 2005 Express.
     
  15. seady

    seady Prince

    Joined:
    Aug 30, 2006
    Messages:
    582
    Location:
    Sydney
    I can't access the microsoft website when using windows but i can access it via linux (long story, yes i have a legal copy etc but i think microsoft blocked my xp).

    Is there any way to get a copy of VC++ 2005 Express through a mirror site? Or from cd/dvd?
     
  16. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    Now - what do I need to do to run debugging for this in Visual C++ 2005 Express?

    When I try to debug it prompts me for the location and name of a debug.exe.
     
  17. mtcharter

    mtcharter Chieftain

    Joined:
    Dec 3, 2006
    Messages:
    4
    Location:
    Potterville, Michigan
    Sorry, I am late to the discussion. TheLopez mods for Air Forces and Military Bases inspired me to become a Civ IV modder. I too have downloaded the Visual Studio 2005 Express edition (i.e free C++ compiler from MS), and have just begun my modding experience. I am starting by compiling unmodified SDK files to ensure I can compile & create the DLL. I get the noted compiler error ['boost::python::detail::make_getter' : none of the 3 overloads could convert all the argument types]. Is there an identified solution allowing use of VSE 2005 for Civ IV modding? Any insight is appreciated.
     
  18. Chazcon

    Chazcon Prince

    Joined:
    Feb 16, 2006
    Messages:
    475
    Location:
    Left Coast
    The solution for using MS Visual C++ 2005 Express to mod the SDK is found at post # 178 in this thread.

    It works perfectly and is so much better than Code::Blocks!

    As an added bonus, I find that the compiled CvGameCoreDLL.dll is approx. .45 MB smaller in size vs. the one compiled in Code::Blocks.
     
  19. MontyLaremane

    MontyLaremane Chieftain

    Joined:
    Nov 30, 2006
    Messages:
    13
    Location:
    England
    Forgive me if I get too technical here, but I think (read "hope") there might be a much simpler way of compiling with Visual C++ 2005 Express.

    There is a compiler switch that changes the default handling of wchar_t from a built-in type to an unsigned short. From what I can tell, changing the handling of the wchar_t type changes the decorated function names in the DLL compiled by VC++ 2005 (those reported by "dumpbin.exe /EXPORT CvGameCoreDLL.dll") so that they are the same as those in the original DLL.

    The switch can be found in the Project Properties dialog box, under Configuration Properties -> C/C++ -> Language. Simply change "Treat wchar_t as Built-in Type" from "Yes" to "No (/Zc:wchar_t-)" and recompile.

    I have tried that twice now and had two completely stable quick games of Warlords without a hitch.

    Please can someone else try that from a clean set of source files to see if it really works, or if I'm just dreaming?!

    Monty
     
  20. PeteT

    PeteT Warlord

    Joined:
    Jan 2, 2002
    Messages:
    273
    Location:
    Winterpeg
    I tried it on an old set of source files (I think they were clean) and, except for the 613 warnings about ''sprintf' was declared deprecated", it built unproblematically.

    Congratulations! :b:
     

Share This Page