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

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    Yes you should delete the .obj files to make a rebuild. Under the CvGameCoreDLL folder you will find a folder named Final_Release just remove everything inside this folder or remove the folder itself. It will be recreated again.
     
  2. Fujisan

    Fujisan Warlord

    Joined:
    Sep 9, 2003
    Messages:
    130
    Gender:
    Male
    I got the following errors during linking.

    What is wrong?

    Code:
    Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
    MSVCRT.lib(crtdll.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored
    MSVCRT.lib(crtdll.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40300040)
    MSVCRT.lib(crtdll.obj) : warning LNK4229: invalid directive '/manifestdependency:type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'' encountered; ignored
    MSVCRT.lib(crtdll.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40300040)
       Creating library ..\Beyond the Sword\Assets\CvGameCoreDLL.lib and object ..\Beyond the Sword\Assets\CvGameCoreDLL.exp
    FDialogTemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ)
    _precompile.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ) referenced in function $L144426
    CyTeamInterface.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ)
    CyUnit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall exception::~exception(void)" (__imp_??1exception@@UAE@XZ) referenced in function $L147631
    
    ...
    
    and a lot of other similar errors...
    I should say that I installed Windows XP SP2 Platform SDK instead of just Platform SDK. Is it important?
     
  3. Raion

    Raion Chieftain

    Joined:
    May 10, 2006
    Messages:
    78
    Go read the first post. You need the Platform SDK from Microsoft that the game was made with which I think is August 2005, or I am guessing. Nothing else will work to re-compile the game for the game's SDK that you can download. Read the instructions, download the proper Platform SDK. Do not try the debug setting, just Final Release, unless you are just re-compiling an individual file. All the files are too much to debug at one time, and it won't do it.
     
  4. Raion

    Raion Chieftain

    Joined:
    May 10, 2006
    Messages:
    78
    And remember that to download a Platform SDK from Microsoft there are different ways to download it. (not so with Direct X SDK's). If you have a slow connection like me, it will take longer, but you can download it in 25mB chunks or so of about 16 different downloads or 18 whatever it is. Otherwise, there is the ISO type download so you can put it to a CD or DVD, or the main download which is one chunk of about something like 500mB file. These files are huge, but the 448mB Direct X SDK can only be downloaded all at once. Since my internet connection can only be on for 4 hours at a time, although I can hook up right away again - it is the Service of the Internet Provider, and if I could stay online for like 18 hours then I could download that stuff in one chunk but again it would take 18 hours total time about or more or less. If I change Internet Service Provider that would not cut me off after 4 hours, then I would not have that problem, that probably many other people do not have, but still the files are huge and it takes a long time without having a fast Internet connection speed.
    That's life and that is Microsoft's SDK's from Microsoft.
    However, I think I will change Internet Service Provider so I can download some stuff for a day about then it will be done, until I get a faster Internet speed connection maybe someday.

    Download the correct download files for the way you want to download from Microsoft for any Platform SDK but again, you need the correct version of the Platform SDK on which this game was built with. Not something else, because all versions either add something or delete something and change something because Microsoft keeps changing things especially Visual Studio. NET programs -- like the 2002 version, the 2003 versions - needed for this game, the 2005 version, and the soon 2008 version. Express versions can be downloaded but again, they have changed those versions and for this game they will not work, unless you have a Make file that was earlier in this thread to tell the program which compiler to use and how the Make file tells the version of the program how to compile the file in the first place. Fun?
    Well, that is programming and according to Microsoft.
    And, well, it is their program unfortunately and they keep changing it.
    :crazyeye:
    Security no doubt being one of the reasons because of people on the Internet or should I say -- hackers, viruses, and other malicious software floating around this WWW.
     
  5. Srdjan

    Srdjan Chieftain

    Joined:
    Sep 18, 2003
    Messages:
    98
    Location:
    Serbia
    I have used VC++ 2005 Express, and have problem with Beyond The Sword SDK. Error message is this:
    Spoiler :
    Error 1 error LNK2019: unresolved external symbol "void __cdecl CyPlayerPythonInterface2(class boost::python::class_<class CyPlayer,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyPlayerPythonInterface2@@YAXAAV?$class_@VCyPlayer@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ) CvDLLPython.obj



    Warlods compilation works fine, but there is a problem with this sdk.
     
  6. Fujisan

    Fujisan Warlord

    Joined:
    Sep 9, 2003
    Messages:
    130
    Gender:
    Male
    Resolved. (I was sure that I grabbed msvcrt.lib, msvcrtd.lib, and msvcprt.lib, actually I didn't :mischief: ). Sorry for wasting your time.

    Yesterday, first time I could compile DLL successfully! :goodjob:
     
  7. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    Good Job Fujisan
     
  8. frekk

    frekk Scourge of St. Lawrence

    Joined:
    Jun 21, 2003
    Messages:
    3,151
    Location:
    Kingston, Ontario
    I am trying to just build the SDK included with BTS 3.13 (it is included, right? It is the folder CvGameCoreCoreDLL?). I haven't made any changes yet, I'm doing a test first.

    I follow all the steps and I keep getting the same error. It seems to start fine and then it just quits all of a sudden with this in the build log:

    Project : CvGameCoreDLL
    Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
    Directory : C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL\
    --------------------------------------------------------------------------------
    Switching to target: Final Release
    CyArea.cpp
    CvArtFileMgr.cpp
    CvCity.cpp
    CvCityAI.cpp
    CvDLLButtonPopup.cpp
    CvDLLEntity.cpp
    CvDLLPython.cpp
    CvDLLWidgetData.cpp
    CvDeal.cpp
    CvDiploParameters.cpp
    CvFractal.cpp
    CvGame.cpp
    CvGameAI.cpp
    CvGameCoreDLL.cpp
    Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL' failed.
     
  9. frekk

    frekk Scourge of St. Lawrence

    Joined:
    Jun 21, 2003
    Messages:
    3,151
    Location:
    Kingston, Ontario
    OK, I figured this out. The answer is here:

    http://forums.civfanatics.com/showthread.php?t=233538

    Maybe it should be added as a step to the tutorial, since it won't work (at least not for BTS) as stated in the original post without this step. Resources.h and CvGameCoreDLL.res must be deleted, and in the panel at the left, the file must also be removed from the folder called "Other" (below "Headers")
     
  10. 77alex77

    77alex77 Chieftain

    Joined:
    Oct 25, 2007
    Messages:
    91
    Location:
    Somewhere beyond the sea
    Oh, right. I got the same error when I tried to compile the dll the first time. I forgot it. You have to remove "CvGameCoreDLL.rc" from the project. Just "right click" > "remove from project" or something like that.

    EDIT: Oh, I have been a bit too late. But I agree: It would be great if this could be added to the initial post.
     
  11. frekk

    frekk Scourge of St. Lawrence

    Joined:
    Jun 21, 2003
    Messages:
    3,151
    Location:
    Kingston, Ontario
    Right CvGameCoreDLL.rc not .res :crazyeye:
     
  12. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    Could someone please translate all of the above for an ignorant like me? I can find some of the values, but far from all of them. Yesterday, I managed to compile a working DLL with some changes to some of the source files. However, this DLL is 6,3 MB, so nearly 1,5 MB bigger than an original 3.13 DLL. The changes were not that many, so I'd like to know how to set up the compiler so it makes a smaller DLL.
     
  13. kevinman4404

    kevinman4404 Lightning Warrior

    Joined:
    Mar 31, 2007
    Messages:
    837
    Location:
    Ontario
    Could someone please provide me insight into these warnings/errors:

    cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
    cl : Command line warning D4027 : source file 'EHsc' ignored

    culminating in...

    fatal error c1067: compiler limit : debug information module size exceeded

    It was working (well almost) without these errors before... they crept in quite suddenly and I haven't once been able to run it without these errors

    Kevin
     
  14. Mylon

    Mylon Amateur Game Designer

    Joined:
    Nov 4, 2005
    Messages:
    1,013
    Has anyone had any luck compiling on a 64 bit system? I got a new computer but I can't get the game to run a DLL compiled on it. Probably due to the 64 bit SDK, as other ones won't install.
     
  15. MatzeHH

    MatzeHH Warlord

    Joined:
    Jan 8, 2006
    Messages:
    210
    Location:
    Germany
    I have no Problem compiling the SDK on Vista 64 using Visual Studio 2003.

    Matze
     
  16. Gedrin

    Gedrin Chieftain

    Joined:
    Mar 27, 2008
    Messages:
    52
    Hi, I think I need a little help.
    I have installed the SDK, the 2003 C++ Toolkit and codeblocks.
    I have created a project, followed all other instructions [I am pretty sure correctly] and started a build.
    about 5 min into the build I get the following:
    -------------- Build: Final Release Win32 in CvGameCoreDLL ---------------

    CyCityInterface1.cpp
    C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\memory(498) : fatal error C1067: compiler limit : debug information module size exceeded
    Process terminated with status 2 (0 minutes, 12 seconds)
    1 errors, 0 warnings

    Which maybe I am really clueless but I don't understand this error.
    Any help from the masses?
     
  17. sgerner

    sgerner Chieftain

    Joined:
    Mar 23, 2002
    Messages:
    12
    Gedrin, by default the BTS project has the /Zi (Produce debugging symbols) option enabled. You want to turn that off to get past the compiler limit error:
    - under: Project --> Build options...
    - in the tab for: Final Release Win 32 --> Compiler Settings --> Other Options
    - remove: /Zi

    Other deviations from the tutorial that I had to make to get everything to build properly include the following:
    1) remove CvGameCoreDLL.rc from the project (you must have already done this though to get this far):
    - in the Projects workspace tab go to the directory (Resources) and right click on the CvGameCoreDLL.rc file. Select "Remove from project"
    2) remove CvGameCoreLL_DEBUG.pdb from linker:
    - under: Projects --> Build options...
    - in the tab for: Final Release Win 32 --> Linker Settings --> Other Linker Options
    - remove: /pdb:Final Debug Win32\CvGameCoreDLL_DEBUG.pdb
     
  18. SerriaFox

    SerriaFox King

    Joined:
    Mar 27, 2008
    Messages:
    751
    Location:
    Texas
    If someone is having problems here are A few thing a noticed:

    1) they have updata code blocks since this was post so the screen shoot are not exactly right, but close enough.

    2) some of the values your ask to change do not appear until you have already tried to compile.

    My advise is try to compile then repeat steps 6-8 on the page one like you nevered did them. oh and make sure it is using the right compiler, i click the right one on first startup but it did seem to make it defualt compiler for the project.
     
  19. Soduka

    Soduka Warlord

    Joined:
    Sep 2, 2007
    Messages:
    289
    Alright, mine compiled, but it doesn't give me a dll. It just gives me several .obj files in \CvGameCoreDLL\Final Release Win32. (Using the free method)


    EDIT: Oh geez, never mind. I hit a wrong button and sent the file into the depths of my documents folder. I'm fine. >.>
     
  20. Pilotis

    Pilotis Prince

    Joined:
    Jan 18, 2005
    Messages:
    500
    Project build:

    fatal error LNK1181: cannot open input file 'boost_python-vc71-mt_32.lib'

    Newbie slavishly following posted instructions.... help appreciated.

    I know there is an earlier post but - well - I just couldn't get my head round it....
     

Share This Page