Installing and using the SDK

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

  1. I'm your Daddy

    I'm your Daddy Your just my play thing

    Joined:
    Oct 18, 2007
    Messages:
    93
    Ok.. heres my probelm... I really did try searching the forum before I came to you guys with it.

    I hit build. It compliles for about forty minutes and then hits me with this error message....

    fatal error LNK1104: .....Beyond the Sword\CvGameCoreDLL\
    cannot open file cvgamecoredll.dll
     
  2. Kalimakhus

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    Check that the file at the target folder (Final_Release\cvgamecoredll.dll) is not read only. The build process is supposed to replace this file with the one you built. If it is read only it can't replace it.
     
  3. Fiend777Fits

    Fiend777Fits Social Parasite

    Joined:
    Sep 29, 2006
    Messages:
    303
    Location:
    Agrasse Knoll, Texas
    question, is it possible to unpack a dll with codeblocks or some other (free) program so as just to edit/view it?
     
  4. I'm your Daddy

    I'm your Daddy Your just my play thing

    Joined:
    Oct 18, 2007
    Messages:
    93
    Yeah.. I thought of that... Wasn't that. I fixed it by changing the target of the output file to a new folder... not sure why it won't let me copy over the old... might be a vista thing.... anyway thanks guys
     
  5. Bruce Wayne

    Bruce Wayne Chieftain

    Joined:
    Apr 15, 2006
    Messages:
    31
    Hi

    I'm having a bunch of problems trying to compile a new CvGameCoreDLL file.

    I'm playing vanilla civ4 (patch 1.61) with SevoMod 3.3 and GIRs ADD-ON loaded, and would like to add TheLopez's Air Forces Mod to the package.

    I downloaded SevoMod's source files, applied the extra codes from TheLopez's mod (thx to his excellent 'how to' guide), and then followed every step in Kael's Guide from post #1, hoping that would do the trick.

    Yet every time the build reaches the 'CvGame.cpp' file, a truckload of error messages appears (mostly refering to 'undeclared identifiers') and the build stops.

    Now, I've spend hours trying to figure out what could be wrong, and tried numerous things to solve it (redownloading, removing and reapplying TheLopez's codes, reinstalling, recompiling etc.). The only thing I haven't done, is to rewrite Sevo's source files - simply because I'm no modder. I only rely on well-explained guides, and excellent threads (like this one) to help me through, 'cause all that code language is just double Dutch to me...

    So now, I turn to you guys. I've put in a few links so you're able to download the source files from Sevo and TheLopez, hoping someone out there might wanna help me build a working CvGameCoreDLL file - or perhaps just tell me what the heck could be wrong (ex. whether it's missing or corrupt files in the downloads, or just me that's 'missing' something).

    Here are the source files I got from the SevoMod thread (I believe all the Mastery_SDK files are included in the SevoMod_Mastery file - but this is the way they were originally posted):

    http://forums.civfanatics.com/uploads/89405/Mastery_SDK.zip
    http://forums.civfanatics.com/uploads/89405/SevoMod_Mastery.zip

    And here are the files from TheLopez's Air Forces Mod:

    http://forums.civfanatics.com/uploads/89405/Air_Forces_changed_files_only_.rar

    Thanks to Sevo for the files (and Titi for uploading them), and TheLopez.

    And Thanks for any help coming my way :)
     
  6. PeteT

    PeteT Warlord

    Joined:
    Jan 2, 2002
    Messages:
    273
    Location:
    Winterpeg
    Bruce, it would be better if you attached your changed files (esp 'CvGame.cpp' and 'CvGame.h').
     
  7. Bruce Wayne

    Bruce Wayne Chieftain

    Joined:
    Apr 15, 2006
    Messages:
    31
    Thanks for the quick reply.

    PeteT, the files you mention should be in the SevoMod_Mastery download - I haven't changed or added anything in them - I just can't make them work.

    As for the Air Forces source files, they do not require changes to the CvGame.cpp file, and whether I add them (where required) or not, I can't make a succesful build when trying to compile a CvGameCoreDLL file.

    I simply uploaded the whole bunch, including the Air Forces source files, hoping someone might be able to build me a working DLL file - 'cause I'm at my wits end...

    Thanks again
     
  8. PeteT

    PeteT Warlord

    Joined:
    Jan 2, 2002
    Messages:
    273
    Location:
    Winterpeg
    That's your problem: it doesn't (usually) work that way. If there are any duplicate files in the downloads, you pretty well have to get an application (like WinMerge) that lets you compare and merge pairs of files, and then do that with the duplicates. I think you would probably have to be lucky to do this successfully without some experience with C++ programming.

    If this were transparently simple, I'd have a go at that; but I'm reluctant to get involved in something that might turn out to be very time consuming.
     
  9. jpinard

    jpinard Martian

    Joined:
    Jan 18, 2002
    Messages:
    760
    Location:
    Enceladus, Saturn
    Added to my list of things to do. This thread is loooooooooong!
     
  10. Hammurabi II

    Hammurabi II Warlord

    Joined:
    Dec 13, 2001
    Messages:
    215
    Location:
    Ohio
  11. Hammurabi II

    Hammurabi II Warlord

    Joined:
    Dec 13, 2001
    Messages:
    215
    Location:
    Ohio
    ok when I click that link it works....but in the install process it doesnt find it.
     
  12. Hammurabi II

    Hammurabi II Warlord

    Joined:
    Dec 13, 2001
    Messages:
    215
    Location:
    Ohio
    Ok nevermind I got it to work by clicking "Retry" some 10 times or so.
     
  13. Methos

    Methos HoF Quattromaster Moderator Hall of Fame Staff

    Joined:
    Jan 1, 2005
    Messages:
    13,100
    Location:
    Missouri
    This statement is confusing me from the OP:

    Am I supposed to open a new project titled the above, or can I find that file somewhere?

    Edit: Duh, found it.
     
  14. Methos

    Methos HoF Quattromaster Moderator Hall of Fame Staff

    Joined:
    Jan 1, 2005
    Messages:
    13,100
    Location:
    Missouri
    I'm getting this error when compiling:

     
  15. Kalimakhus

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    @Methos

    Just remove CvGameCoreDLL.rc from the Code Blocks project.
     
  16. Methos

    Methos HoF Quattromaster Moderator Hall of Fame Staff

    Joined:
    Jan 1, 2005
    Messages:
    13,100
    Location:
    Missouri
    Thanks, but now I'm getting this error:

    I have the file. It's located at \Microsoft Platform SDK\Lib

    Edit: According to a little googling, it's due to spaces in the path name. Should I have my paths in quotes under Settings->Compiler? Or is it something else?
     
  17. Methos

    Methos HoF Quattromaster Moderator Hall of Fame Staff

    Joined:
    Jan 1, 2005
    Messages:
    13,100
    Location:
    Missouri
    Turns out my problem was that one of my links was wrong. Now, I have 38 errors, so it looks like I'm going to be busy! :crazyeye:
     
  18. Feeder74

    Feeder74 Chieftain

    Joined:
    Oct 31, 2007
    Messages:
    57
    C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\memory:498: fatal error C1067: compiler limit : debug information module size exceeded
    So, how do I expand the module size please?
     
  19. Raion

    Raion Chieftain

    Joined:
    May 10, 2006
    Messages:
    78
    >>>>>C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\memory:498: fatal error C1067: compiler limit : debug information module size exceeded
    So, how do I expand the module size please?
    <<<<<<

    mmmm...................I do not think that you can, but then I am not sure, and all I know is not to Build the File on Debug Setting but only use the Final Release version setting to build the file.

    Afterall, there may be something in the Help File for the Platform SDK, but I think in the end, that without having the Professional version of Visual Studio .NET 2003 complete version handy, you may not find out anything.

    Debug versions of any compiled programming will include all the debug information, but when you only build the Release version (or in this case because of Codeblocks - the Final Release version) then all that info is left out and the build is smaller, plus the fact that there are separate Libraries for a Debug version vs. the Library files for a Release version of any computer software programming.
    Perhaps maybe in the end, most programming is done over a Network of computers when finalized, it is all put together into the Final Release of a programming project or game -- it may be just that Debug versions are each separate kind of file to find the problems first, and then the Debug version file would not be so big in the first place.
    Whatever it is, I am sure it would be mentioned somewhere in the Help Files of the Professional version of Visual Studio .NET 2003, but again, you are only using the compiler given with a free version which does not include the IDE of the full version and again, it may be that the Debug version file including all that info is limited in size, and whether or not it can be increased - there probably is no help given with what you have, and the only other way to look up anything about it may be at the Microsoft.com website for the MSDN Library - if, they have decided to include it because Visual Studio .NET 2005 has been released already due to Microsoft changing Security around since they (and probably helped with the Feds) have decided that all their Security because of the Internet was not enough and holes used my Hackers are in the software of the OS in the first place and all those Critical Updates come along to Update your OS - from Windows Update.

    The closest I can come with Visual Studio .NET 2001 is actually nothing is mentioned so far as how to increase file size but here is some of it:

    Debug Versions of Heap Functions
    The Debug versions of the heap functions call the standard or base versions used in Release builds. When you request a memory block, the debug heap manager allocates from the base heap a slightly larger block of memory than requested and returns a pointer to your portion of that block. For example, suppose your application contains the call: malloc( 10 ). In a Release build, malloc would call the base heap allocation routine requesting an allocation of 10 bytes. In a Debug build, however, malloc would call _malloc_dbg, which would then call the base heap allocation routine requesting an allocation of 10 bytes plus approximately 36 bytes of additional memory. All the resulting memory blocks in the debug heap are connected in a single linked list, ordered according to when they were allocated.

    Memory Allocation on the Debug Heap

    The additional memory allocated by the debug heap routines is used for bookkeeping information, for pointers that link debug memory blocks together, and for small buffers on either side of your data to catch overwrites of the allocated region.

    Currently, the block header structure used to store the debug heap's bookkeeping information is declared as follows in the DBGINT.H header file:

    typedef struct _CrtMemBlockHeader
    {
    // Pointer to the block allocated just before this one:
    struct _CrtMemBlockHeader *pBlockHeaderNext;
    // Pointer to the block allocated just after this one:
    struct _CrtMemBlockHeader *pBlockHeaderPrev;
    char *szFileName; // File name
    int nLine; // Line number
    size_t nDataSize; // Size of user block
    int nBlockUse; // Type of block
    long lRequest; // Allocation number
    // Buffer just before (lower than) the user's memory:
    unsigned char gap[nNoMansLandSize];
    } _CrtMemBlockHeader;

    /* In an actual memory block in the debug heap,
    * this structure is followed by:
    * unsigned char data[nDataSize];
    * unsigned char anotherGap[nNoMansLandSize];
    */
    The NoMansLand buffers on either side of the user data area of the block are currently 4 bytes in size, and are filled with a known byte value used by the debug heap routines to verify that the limits of the user's memory block have not been overwritten. The debug heap also fills new memory blocks with a known value. If you elect to keep freed blocks in the heap's linked list as explained below, these freed blocks are also filled with a known value. Currently, the actual byte values used are as follows:

    NoMansLand (0xFD)
    The "NoMansLand" buffers on either side of the memory used by an application are currently filled with 0xFD.
    Freed blocks (0xDD)
    The freed blocks kept unused in the debug heap's linked list when the _CRTDBG_DELAY_FREE_MEM_DF flag is set are currently filled with 0xDD.
    New objects (0xCD)
    New objects are filled with 0xCD when they are allocated.
    See Also
    The CRT Debug Heap


    You see this is only one page of the Help File from Visual Studio .NET 2001 version, but as yet, there is nothing else that decides how big of a file is allowed for the debug file and knowing exactly what to do may depend on Heap Size and Memory Allocated for Debugging any program in the first place.

    There is a default setting in the first place or I guess otherwise other things have to be included and done to allow all the Debugging to take place somehow.

    :confused:
     
  20. I'm your Daddy

    I'm your Daddy Your just my play thing

    Joined:
    Oct 18, 2007
    Messages:
    93
    Another probelm... I love you guys.. :p ok here it is.. I managed to get everything to compile before 3.13... but some thing has changed.. I'm trying to build and I'm hit with 22 exteral errors all relating to .obj files...

    Now am I to delete the .obj files?? because if so.. where are they? Am I missing some thing? :confused:
     

Share This Page