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. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    I tried to use two different CvGameCore.DLLs :

    1.) compiled with MS VC++ Express 2005 -> failed. The game CTD after lading screen.
    2.) compiled with CodeBlocks and MS VC++ Toolkit 2003 -> OK

    Suchy : have you been able to play with that DLL or did you only compile it?

    To the GetKeyState : I used seperate installed SDK Platform. Havn't know its part of the Express edition. Will try to use only the inbuilt one.
     
  2. The_Grand_User

    The_Grand_User Chieftain

    Joined:
    Apr 16, 2006
    Messages:
    2
    I also got a fatal error when I tried too use the Dll I made with VSE2005, so I guess someones going to have to fix the original problem with "boost::python::detail::make_getter". Looks like it's a problem in the boost code though, maybe the newest version would work.
     
  3. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    I don't think its the make_getter problem. I did compile the dll with the changes Suchy told, using codeblock and VC++ Toolkit 2003 and it seems to work.
     
  4. The_Grand_User

    The_Grand_User Chieftain

    Joined:
    Apr 16, 2006
    Messages:
    2
    I mean VSE2005 has a problem with the make_getter function.
     
  5. Suchy_63

    Suchy_63 Chieftain

    Joined:
    Jun 1, 2004
    Messages:
    10
    Location:
    Montreal
    You are right, it crashed for me too.

    Maybe Platform SDK is not included in Express edition. In fact I think downloaded version is better to use because it is the latest update, I just didn't get around to install one.
     
  6. A Silly Goose

    A Silly Goose Goose of Silliness

    Joined:
    Jan 15, 2006
    Messages:
    157
    Location:
    South Carolina, USA
    The Platform SDK isn't in any version of Visual Studio. As such, you have to download it separately, and then configure the linkage and whatnot in VC++E; if you don't, you get the "windows.h not found" problem.

    I'm pretty sure the source of the problem is in the compiler that VC++E uses--the newer 2005 version, as opposed to the 2003 compiler, which is the one that the Codeblocks method uses. I wonder what would happen if you swapped VSE's cl.exe with the Toolkit 2003's version manually...
     
  7. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    Well I am at my wits end here, I keep getting the same error that ?Eclipse? got a page ago (wonder if he ever resolved it?)

    fatal error LNK1181: cannot open input file 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib.obj

    I am shure the pathway is correct I pasted it from its installed location. What confuses me is why its trying to open the lib directory as a .obj file? I tried using C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib\ to try to make it desend into the lib directory but this gives me an even more confusing

    canot open input file 'Files\Microsoft.obj'

    Code Blocks is clearly insane
     
  8. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    I'm having a major problem installing the platform SDK. Everytime I try to instal it I get this error
    Code:
    Error 1606. Could not access network location
    http://download.microsoft.com/download/a/5/f/a5f9d781-e201-4a
    b6-8c6a-9bb4efed1e1a/psdk-amd64_0-common.0.cab.
    
    How do i get it to work?
     
  9. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    I know I got exactly that error when I tried to install. The issue was I had entered something incorrectly in the codeblocks configuration (so many of the dialog boxes are called the same thing). I wish i could remember exactly which one I entered incorrectly.

    I went back and added screenshots at each of the configuration steps in the 1st post, hopefully that helps.
     
  10. 12monkeys

    12monkeys Prince

    Joined:
    Nov 24, 2003
    Messages:
    440
    Location:
    Germany, Europe
    Platform SDK is included in Express Edition as well, but I don't know the version. Anyway, I tried both and the effect is the same -> CTD before engine inits.

    So I think there is a global incompatibility between the VC++ 2005 and the VC++ 2003. If found out what that is, we may use the 2005 version.
     
  11. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Does this help?
     
  12. c.fe

    c.fe Warlord

    Joined:
    Sep 20, 2003
    Messages:
    133
    Location:
    Germany
    I can just confirm that it crashes, too, when I use VC 2005. And the dll is 500 KB smaller.

    I'm nevertheless impressed how you solved the compile problem. As I see it there is no direct connection between the error and the code line :confused: .
     
  13. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    Beyond the Veil
    I've tried everything and its still not working. Can someone please help me?
     
  14. White Elk

    White Elk 99 > 1

    Joined:
    Jan 9, 2002
    Messages:
    2,126
    Location:
    Pacific Northwest, USA
    Thank You Dave and Kael!! This is most excellant! Even a newbie like myself, will be able to use this thing! Thanks for taking the time to share this with us!!
     
  15. talchas

    talchas Prince

    Joined:
    Jan 3, 2006
    Messages:
    428
    Well, I suggest you dl the iso version - thats worked for me.
     
  16. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    Finaly it works, I whet in and deleted ALL the stuff in step 6 and re-did it

    I think the problem was had entered the directories under Linker->Link Libraries and it was trying to open the directory as a libraby object. Once I removed them I got a sucessfull compile and a .dll file. Other have mentioned it and I noticed it as well that without even altering the sorce code you get a dll that is 4.66 MB vs the normal Civ4 dll of 3 something. I dont notice any game play differences though.

    Thanks a bunch everyone out their in tutorial/help thread land!
     
  17. Harre

    Harre Chieftain

    Joined:
    May 10, 2004
    Messages:
    39
    Location:
    Sweden
    Tried kompiling with VC 2005 and it crashed to desktop aswell. And I have spent some hours now to get it to work.

    I have a theory that it should work with if I link with the runtime library from VC2003 toolkit.

    I downloaded msvcrtd.lib, msvcrtd.lib and msvcprt.lib I
    nstalled the WinSDK and VC2003toolkit and ripped the include dirs from both programs and added those .h files into the solution.
    Selected "ignore all default libs" and "ignore standard include path" in VC2005 and after compiling it complains in the linking part on missing references. After adding python24.lib and OLDNAMES.lib in the link list I get two undeclared externals:

    ___CxxFrameHandler3 (81 references)
    __ftol2_sse (7 references)

    a little .h file with this content get rid of __ftol2_sse:
    extern "C" long _ftol2(double);
    extern "C" long _ftol2_sse(double x) { return _ftol2(x); }


    So what is ___CxxFrameHandler3 and how can I get rid of it?

    Edit: looks like it's an internal member for exception handling, so you have to use VC2003 if you want to use exceptions. Or just disable them in VC2005, but I havent tried that yet.

    Edit2: the code uses exception so I think you're stuck with VC2003 until firaxis makes civIV compatible somehow with VC2005-produced dlls
     
  18. Aussie_Lurker

    Aussie_Lurker Deity

    Joined:
    Jul 21, 2003
    Messages:
    7,785
    Location:
    Adelaide, South Australia
    Hi guys, need help. Have done well so far but, in the CodeBlocks section, it says to open \CvGameCoreDLL\GameCoreDLL.vj....(some extension).

    Now two questions: 1) Where is this file located?
    2) Do I open it under 'File', then go to Settings--->Compiler?

    Oh, and a 3rd question. I assume that the file is located within the Civ4_SDK_Platform folder. Only problem is that there are two GameCoreDLL files in there, one a C++ Source file, the other a Header file-which do I actually open? Or is there a 3rd one I am unaware of? Hope that all makes sense.

    Thanks in advance for any help you can give.

    Yours,
    Aussie_Lurker.
     
  19. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Its in the SDK from Firaxis/Take2 download (linked int he first post before the quote section). The SDK that is download in the quoted steps is Microsofts SDK.

    Yeap.
     
  20. Zenious

    Zenious Linux user

    Joined:
    Feb 11, 2006
    Messages:
    73
    Location:
    Indiana, USA
    I've had the same trouble. Please help me!

    EDIT: I solved it. I just had to change it from "All known files" to "All files"
     

Share This Page