Page 10 of 11 FirstFirst ... 7 8 9 10 11 LastLast
Results 271 to 300 of 308

Thread: COMPILE: Getting the source to compile

  1. #271
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Thanks Fromafar.

    Originally posted by Fromafar

    The warnings for dbgen are Microsoft inventions. Adding _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS to the preprocessor definitions should get rid of those.
    This worked, dbgen is fine now.

    The single warning with each map generator can be solved by removing 1 line from the Module Definition file. I will add the modified file to the archive.
    I updated all my files to the latest revision (882) but I still get the same "warning LNK4017" warning.

    It looks like there are only 2 main errors when compiling ctp2.
    Firstly, you have to check some of the database files (specifically: RiskRecord, PollutionRecord, and MapRecord). It looks like these have not been (re)generated correctly.
    I'll take a look, but I don't know what I'm looking for.

    Secondly, there are some errors in refclock.h. Those are probably caused by your manual mixing of new Windows Platform SDK and old DXSDK files. Better remove the borrowed files, and check that your include and library paths are correct and complete.
    Apparently dinput.h and dsound.h are not included in the Windows SDK, they're only in the DirectX SDK. I will have to install the DXSDK alongside the Windows SDK. Then I'll have to figure out which folders to use.

    The Windows SDK readme doesn't make any mention of uninstalling DXSDK to install the Windows SDK (only earlier Platform SDK'S), so it should be fine.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  2. #272
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    I updated all my files to the latest revision (882) but I still get the same "warning LNK4017" warning.
    This is what I have found so far:
    http://www.mico.org/pipermail/mico-d...er/005242.html

    But since it is just a warning, you can ignore it for now.


    Originally posted by Maquiladora
    I'll take a look, but I don't know what I'm looking for.
    Well you could look for the files in the newdb folder and look whether all the Record files are there.

    Originally posted by Maquiladora
    Apparently dinput.h and dsound.h are not included in the Windows SDK, they're only in the DirectX SDK. I will have to install the DXSDK alongside the Windows SDK. Then I'll have to figure out which folders to use.
    That's how I did it. Here is what I have at the top of the include directories:

    D:\DirectX_SDK_Oct_2006\Include
    D:\Programme\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\Ba seClasses

    And here are the lib directories:

    D:\DirectX_SDK_Oct_2006\Lib\x86
    D:\Programme\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\Ba seClasses\Debug

    Maybe the subdirectories are different, that may be, because I have here the last DirectX version that is supposed to support Win98.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  3. #273
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    Well you could look for the files in the newdb folder and look whether all the Record files are there.
    Risk has:

    Risk.cdb
    RiskRecord.cpp
    RiskRecord.h

    Pollution and Map has the same three names and types.

    But most others also have .old files, and some have .stamp.

    That's how I did it. Here is what I have at the top of the include directories:
    That is how mine looked when I last compiled.

    Now I'm down to 224 errors and no warnings for ctp2. The 10 errors and 1 warning related to refclock.h were fixed. So now only these risk/pollution/map database problems remain.
    Last edited by Maquiladora; August 6, 2008 at 18:05.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  4. #274
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    So now only these risk/pollution/map database problems remain.
    Well you could create those files manually again. To do it go to Visual Studio look at the file tree and find the newdb files. There you have in the list the cdb files. Right click on these files and compile and see what happens.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  5. #275
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    Well you could create those files manually again. To do it go to Visual Studio look at the file tree and find the newdb files. There you have in the list the cdb files. Right click on these files and compile and see what happens.
    They all compiled fine. I'm trying to compile ctp2 again now.

    EDIT: Well it looks like I already still have the same problems as before.
    Last edited by Maquiladora; August 6, 2008 at 18:28.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  6. #276
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Can you check whether, the corresponding, *.cpp and *.h are present in the newdb folder in Visual Studio. And can you compare the properties of the *.cdb files in question with those that are ok?

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  7. #277
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann
    Can you check whether, the corresponding, *.cpp and *.h are present in the newdb folder in Visual Studio.
    They are present.

    And can you compare the properties of the *.cdb files in question with those that are ok?
    They look the same. Map doesn't have dbgen.exe as a dependency like Pollution and Risks, but some other files don't have a dependency either. Apart from that nothing is different.

    There is not a lot of options there anyway. Just configuration properties (general 2 options), and custom build step (general 4 options).
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  8. #278
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Well, for now I have no more ideas, maybe Fromafar has some. But of course the must be a solution for the problem since the other databases work and I don't have any problems with that.

    EDIT: Well, I could try again to convert the workspace and see what happens, but not today.

    -Martin
    Last edited by Martin Gühmann; August 6, 2008 at 18:57.
    Civ2 military advisor: "No complaints, Sir!"

  9. #279
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Well, maybe there went something wrong with the VC6 workspaces, or I did something after conversion that I forgot.

    So here are the civctp.vcproj and the civctp.sln.

    -Martin
    Attached Files Attached Files
    Civ2 military advisor: "No complaints, Sir!"

  10. #280
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann
    Well, maybe there went something wrong with the VC6 workspaces, or I did something after conversion that I forgot.

    So here are the civctp.vcproj and the civctp.sln.
    I got the same number and type of errors. Thanks for trying though.

    I'll wait another day and then perhaps I should try a fresh install and update of the code.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  11. #281
    Fromafar
    Prince
    Join Date
    25 May 2003
    Posts
    622
    Country
    This is Fromafar's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28
    Originally posted by Maquiladora
    I updated all my files to the latest revision (882) but I still get the same "warning LNK4017" warning.
    Updating the files is not enough. You have to modify the Linker settings to use the new file (MapGenerator.def) instead of the current ones (Crater.def etc.) for each project.

    I dug up some old notes about the database generation stuff. Maybe this will help:


    Notes on custom build steps for Microsoft Visual Studio 2005

    1. Add custom build rules

    Menu Tools|Options|Projects and Solutions|VC++ Project Settings|Rule File Search Paths: add \ctp2_code\compiler\msvc8.
    Select the ctp2 project, right-click, select Custom Build Rules. Tick the boxes "Ctp2 Code Generation", "Scanner Generation", "Parser Generation".
    Same for the dbgen project, but only "Scanner Generation" and "Parser Generation".

    2. Use custom build rules

    Select a .cdb file, right-click, select Properties. For Configuration Properties|General|Tool, choose CtP2 Database Code Generator from the drop-down list.
    For .l files, choose Scanner Generator. Fill in the Unique Name part (default "yy" generates lex.yy.c, set to "sc" for sliccmd.l, "dbl" for DBLexer.l, "ldl" for ldl.l) when needed.
    For .y files, choose Parser Generator. Fill in the Unique Name Part (default: "y" generates y.tab.h + y.tab.c, set to "sc" for sliccmd.y, "ldl" for ldl.y) and Directory (default: not needed, set to "..\\gs\\slic\\" for slic.y and sliccmd.y, "..\\ui\\ldl\\" for ldl.y) when needed.

    3. Verification

    Select a .cdb/.l/.y file, right-click, select Compile. In the build output window you should see something like "Generating database code/scanner/parser for <selected file>".

    4. Problem solving

    When the database generation looks OK (both "Generating database code for <whatever>.cdb" and "<whatever>Record.cpp" appear without errors in the build output window), but there are errors compiling files that #include the generated code, check the ctp2_code\gs\database directory for remainders of obsolete old format files, and remove these manually. The vcproj file is not maintained in Subversion.

  12. #282
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Fromafar
    Updating the files is not enough. You have to modify the Linker settings to use the new file (MapGenerator.def) instead of the current ones (Crater.def etc.) for each project.
    Cab the MapGenerator.def file be used in MSVC6 or is that some Microsoft compiler version specific stuff. Well, maybe I just should try the file on MSVC6.

    Originally posted by Fromafar
    4. Problem solving

    When the database generation looks OK (both "Generating database code for <whatever>.cdb" and "<whatever>Record.cpp" appear without errors in the build output window), but there are errors compiling files that #include the generated code, check the ctp2_code\gs\database directory for remainders of obsolete old format files, and remove these manually. The vcproj file is not maintained in Subversion.
    Maybe this is the problem, the code downloaded from the repository is free of those old files, but if you put the code from the repository onto a previous installation of the code then you have problems.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  13. #283
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Fromafar

    Updating the files is not enough. You have to modify the Linker settings to use the new file (MapGenerator.def) instead of the current ones (Crater.def etc.) for each project.
    Thanks, they're all fine now.

    So the 4 mapgen files and dbgen are compiling without errors or warnings.

    4. Problem solving

    When the database generation looks OK (both "Generating database code for <whatever>.cdb" and "<whatever>Record.cpp" appear without errors in the build output window), but there are errors compiling files that #include the generated code, check the ctp2_code\gs\database directory for remainders of obsolete old format files, and remove these manually. The vcproj file is not maintained in Subversion.
    It seems this was the problem.

    I took the lazy route and moved all the old (not modified by the repository) files out of the folder and compiled and got no warnings and only 1 error on ctp2:

    .\ctp2_rsrc\civ3.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
    I found my afxres.h file in two folders:

    \Microsoft SDKs\Windows\v6.1\Samples\winui\TSF\tsfapp
    \Microsoft SDKs\Windows\v6.1\Samples\winui\TSF\tsfcompart

    I added the first directory to my include directories (below DXSDK, BaseClasses, and WinSDK), and civ3.rc compiled without errors.

    I tried compiling the whole thing again (thinking it should work now), but I got 1 error:

    LINK : fatal error LNK1181: cannot open input file 'dinput.lib'
    I searched for the file but didn't have it anywhere, I only have dinput8.lib in my DXSDK\lib\x86 folder.

    I'll have to stop for now though. Any suggestions on how best I should fix this?

    I've attached my last full build log.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  14. #284
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Arrow

    The log
    Attached Files Attached Files
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  15. #285
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    I searched for the file but didn't have it anywhere, I only have dinput8.lib in my DXSDK\lib\x86 folder.

    I'll have to stop for now though. Any suggestions on how best I should fix this?
    In that case you should go some posts back :

    Originally posted by Martin Gühmann
    That's how I did it. Here is what I have at the top of the include directories:

    D:\DirectX_SDK_Oct_2006\Include
    D:\Programme\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\Ba seClasses

    And here are the lib directories:

    D:\DirectX_SDK_Oct_2006\Lib\x86
    D:\Programme\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\Ba seClasses\Debug
    So you see the lib folder is included.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  16. #286
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Well, for the databases the alternative solution would have been to make sure that the newdb directory is listed before the database directory in the additional include directories.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  17. #287
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Question

    Originally posted by Martin Gühmann

    In that case you should go some posts back :

    So you see the lib folder is included.
    That is how mine looks (plus many other folders), see attached picture.
    Attached Images Attached Images
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  18. #288
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    That is how mine looks (plus many other folders), see attached picture.
    No, I mean something else: In the menu bar there you have Projects > ctp2-properties (or however it is called in the English version). There in the right panel you have Configuration Properties > C/C++ > General on the right hand you have then the Additional Include directories, which start with ..\os\include\.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  19. #289
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    No, I mean something else: In the menu bar there you have Projects > ctp2-properties (or however it is called in the English version). There in the right panel you have Configuration Properties > C/C++ > General on the right hand you have then the Additional Include directories, which start with ..\os\include\.
    Do I need to include the four folders you mentioned above, and in that order, at the top of the list? I just tried that and it made no difference, I still got the 1 link dinput.lib error. Obviously it still seems to be asking for a file that I don't have anywhere on my PC.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  20. #290
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    Do I need to include the four folders you mentioned above, and in that order, at the top of the list? I just tried that and it made no difference, I still got the 1 link dinput.lib error. Obviously it still seems to be asking for a file that I don't have anywhere on my PC.
    Actually I was talking about something else. For the dinput.lib, Microsoft removed it from DirectX and we are left with dinput8.lib, unfortunately those aren't the same, so just replacing them may cause some problems.

    At least I know that the file is part of my DirectX distribution. Probably we have also to check whether we really need this file, or can replace it.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  21. #291
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    Actually I was talking about something else. For the dinput.lib, Microsoft removed it from DirectX and we are left with dinput8.lib, unfortunately those aren't the same, so just replacing them may cause some problems.

    At least I know that the file is part of my DirectX distribution. Probably we have also to check whether we really need this file, or can replace it.
    Should I just go ahead and get an earlier DXSDK then?

    I have the Microsoft link for the same one as you. Oct 2006?
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  22. #292
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    Should I just go ahead and get an earlier DXSDK then?

    I have the Microsoft link for the same one as you. Oct 2006?
    Well, that was it that I had in mind. Actually, it isn't nice to download something big like that but if you dare to download Cradle 2, well then it doesn't seem to be such a problem.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  23. #293
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    Well, that was it that I had in mind. Actually, it isn't nice to download something big like that but if you dare to download Cradle 2, well then it doesn't seem to be such a problem.
    I have 4 different versions of DXSDK now

    Well I installed Oct 2006 DXSDK and it all compiled without errors. But my ctp2.exe is only 3.79MB, but the last release is 4.92MB. I guess this is because the last release was compiled with VC6?

    My ctp2.exe also freezes when I build my first city. Everything seems fine (I only tried for 50 turns) when I attach and watch the AI though.
    Last edited by Maquiladora; August 9, 2008 at 22:35.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  24. #294
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    Well I installed Oct 2006 DXSDK and it all compiled without errors. But my ctp2.exe is only 3.79MB, but the last release is 4.92MB. I guess this is because the last release was compiled with VC6?
    Yes, that's the difference.

    Originally posted by Maquiladora
    My ctp2.exe also freezes when I build my first city.
    How long is the freeze?

    Originally posted by Maquiladora
    Everything seems fine (I only tried for 50 turns) when I attach and watch the AI though.
    Then you should play longer, I usually test the AI for 200 turns this way, and then I see that suddenly the AI stops to tasks its units, and this is definitely different from a VC6 version.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  25. #295
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Question

    Originally posted by Martin Gühmann

    How long is the freeze?
    About 30 seconds then it crashes with this crash.txt:

    Version 2008-08-10
    0x005a3708 [?SetActionFuncAndCookie@aui_Control@@QAE?AW4AUI_ER RCODE@@P6AXPAV1@IIPAX@Z1@Z + 0x8]
    Then you should play longer, I usually test the AI for 200 turns this way, and then I see that suddenly the AI stops to tasks its units, and this is definitely different from a VC6 version.
    I watched a 3 AI game on a small map for 200 turns but they were all still moving, slaving etc, but perhaps I can't notice the exact problem.

    When I detached the AI and tried to open the city manager I get the same error as above. Perhaps I haven't included all the files I'm supposed to? What files exactly do I need from the project I compiled?
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  26. #296
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    About 30 seconds then it crashes with this crash.txt:
    Looks like you stumbled across the first thing you have to debug. For that you have to build a debug version. To do this go the menu bar -> Build -> Configuration Manager, there set the active configuration to Debug. Then go to the menu bar -> Project -> ctp2 properties. There go to configuration properties and then Debugging. Add to the program options or program arguments or however it is called nonexclusive. This is needed so that the debugger has any use to you.

    Then compile and run the program with the debugger for that you have to start the program with F5 for instance.

    Now test whether the problem occurs also in debug mode. If yes, the debugger gives you the exact position in the code where the program failed.

    I think at this point you may just explore the debugger a little bit, so that you get familiar with. You may also find a this pointer that is pointing to zero. If you find something like this than you have found a problem. If not the problem is somewhere else.

    Originally posted by Maquiladora
    I watched a 3 AI game on a small map for 200 turns but they were all still moving, slaving etc, but perhaps I can't notice the exact problem.

    When I detached the AI and tried to open the city manager I get the same error as above. Perhaps I haven't included all the files I'm supposed to? What files exactly do I need from the project I compiled?
    Well, I use for testing 10 players and the Barbarians, and also a map sized one below gigantic, that has some sea on it.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  27. #297
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Originally posted by Martin Gühmann

    Then compile and run the program with the debugger for that you have to start the program with F5 for instance.

    Now test whether the problem occurs also in debug mode. If yes, the debugger gives you the exact position in the code where the program failed.
    I got 98 warnings with ctp2 when compiling the debug version, I've attached the build log but its stuff like this:

    c:\ctp2\ctp2_code\gs\gameobj\player.cpp(2031) : warning C4244: '*=' : conversion from 'double' to 'sint32', possible loss of data
    I got no errors that stopped it compiling though so I tried the debugger, but when I try to run it says it can't find MSVCRTD.dll and can't run it. I searched my whole HDD for the file but couldn't find it, so I downloaded it and installed it in windows\system32. Now the debugger runs and... the human settling problem isn't there with the debug version.

    I should say here, when I first tried the final version I had compiled, I copied the 4 mapgen files, ctp2.exe and ctp2.map to my regular AE CtP2 install and then tried it. I didn't try it from where it was compiled.

    I just tried the final version again now but this time left ctp2.exe, ctp2.map, and the mapgen files where they were compiled (and copied all other dlls like mss32.dll etc so it would run from the source folder) and the human settling problem disappeared. So what files did I forget to copy when I tried it from my normal AE folder? And should I continue to test any versions I compile from the source folder and not copy them anywhere?

    In summary, the version I compiled now works (except the AI stopping tasking it's units, although I haven't spotted that yet), debug and final versions, so I no longer need to debug anything, for the moment.

    However I would still like the fix the warnings I get compiling the debug version, for the future.
    Attached Files Attached Files
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  28. #298
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 24, 2013
    Local Time
    17:28

    Post

    Originally posted by Maquiladora
    I got 98 warnings with ctp2 when compiling the debug version, I've attached the build log but its stuff like this:
    98 warnings so what? Go to menu bar -> ctp2 project properties -> configuration properties -> C++ and set the warning level to level 4. Then you get a lot of warnings.

    Originally posted by Maquiladora
    However I would still like the fix the warnings I get compiling the debug version, for the future.
    Of course we would like to remove them, but there are other things to do.

    Originally posted by Maquiladora
    I should say here, when I first tried the final version I had compiled, I copied the 4 mapgen files, ctp2.exe and ctp2.map to my regular AE CtP2 install and then tried it. I didn't try it from where it was compiled.

    I just tried the final version again now but this time left ctp2.exe, ctp2.map, and the mapgen files where they were compiled (and copied all other dlls like mss32.dll etc so it would run from the source folder) and the human settling problem disappeared. So what files did I forget to copy when I tried it from my normal AE folder? And should I continue to test any versions I compile from the source folder and not copy them anywhere?
    Looks like you had copied everything needed. But maybe there is a file in the target whose version the newly compiled executable doesn't like or whatever.

    For testing the game, you start it of course from Visual Studio, or do you want to copy always the executable, even if you just have changed a tiny code line?

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  29. #299
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 24, 2013
    Local Time
    08:28
    2. Use custom build rules

    Select a .cdb file, right-click, select Properties. For Configuration Properties|General|Tool, choose CtP2 Database Code Generator from the drop-down list.
    For .l files, choose Scanner Generator. Fill in the Unique Name part (default "yy" generates lex.yy.c, set to "sc" for sliccmd.l, "dbl" for DBLexer.l, "ldl" for ldl.l) when needed.
    For .y files, choose Parser Generator. Fill in the Unique Name Part (default: "y" generates y.tab.h + y.tab.c, set to "sc" for sliccmd.y, "ldl" for ldl.y) and Directory (default: not needed, set to "..\\gs\\slic\\" for slic.y and sliccmd.y, "..\\ui\\ldl\\" for ldl.y) when needed.
    I'm having trouble with this part. I cannot add the "Unique Name Part", the box is grayed out.

  30. #300
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 24, 2013
    Local Time
    16:28

    Post

    Quote Originally Posted by EPW View Post
    I'm having trouble with this part. I cannot add the "Unique Name Part", the box is grayed out.
    I assumed you only needed to try that if your .cdb files were not generating correctly. And I fixed my problems with those by removing the old database files.

    I can't fill in the Unique Name Part either, but the whole project compiles with 0 errors or warnings anyway.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

Page 10 of 11 FirstFirst ... 7 8 9 10 11 LastLast

Similar Threads

  1. HELP needed to compile the SDK
    By Thror78 in forum Civilization IV Creation
    Replies: 1
    Last Post: August 28, 2006, 18:57
  2. Compile the source code, missing headers
    By jacquipre in forum CtP2 Source Code Project
    Replies: 18
    Last Post: June 11, 2006, 10:03
  3. COMPILE: Getting the source to compile on VS.NET
    By vovan in forum CtP2 Source Code Project
    Replies: 62
    Last Post: July 8, 2004, 00:25
  4. compile fails; OS X 10.3.3
    By zbgump in forum Freeciv
    Replies: 1
    Last Post: March 18, 2004, 04:45
  5. Can't compile FreeCiv-SDL from cvs source
    By thethawav in forum Freeciv
    Replies: 3
    Last Post: March 29, 2003, 07:23

Visitors found this page by searching for:

mss32.lib

Error spawning mt.exe visual studio 2008

reftime.h no such file or directory

Project : error PRJ0003 : Error spawning mt.exe

error LNK2001: unresolved external symbol _xGetSystemMetrics@4

error C2065: UNITS : undeclared identifier

IBasicVideo2 : base class undefined

reftime.h missing

hmonitor struct type redefinition

knock sequence unresolved identifier

file:line:oassert

error LNK2005: localtime already defined

error c2504: ibasicvideo2 : base class undefined

Build project under Microsoft Platform SDKSamplesMultimediaDirectShowBaseClasses

error prj0003 : error spawning mt.exe.

ogre dinput.h

error lnk2005: class ogre::controller

cannot open source file lex.yy.cc

file:fiq_drv.cline:188assert(dsp assert id:21)project : error prj0003 : error spawning mt.exe.error c2061: syntax error : identifier hmonitor2008 hmonitor redefinitionError 1 fatal error C1083: Cannot open include file: ddraw.h: No such file or directory c:program filesmicrosoft sdkswindowsv7.0samplesmultimediadirectshowbaseclassesstreams.h 42error LNK2001: unresolved external symbol _xGetMonitorInfo@8c1 : fatal error c1083: cannot open source file:

Bookmarks

Posting Permissions