Announcement

Collapse
No announcement yet.

COMPILE: Getting the source to compile

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    Missing source files may be things which were suposed to be generated by byacc or flex. Ensure that you have successfully compiled everything else before you worry about the main ctp2 project itself.

    I have now successgully compiled and linked (Hooray! ), I even discovered why the byacc/flex commands hadn't been working before (a little typo in my definition of CDKDIR...).

    I think the trick was to start again, and also have DXMedia copied into the libs directory. I think the last version I was using had accumulated problems due to me rearranging things so much.

    However, when I run the executable, I just get a blank screen...

    Comment


    • #77
      what about the stuff form ctp pics etc
      "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
      The BIG MC making ctp2 a much unsafer place.
      Visit the big mc’s website

      Comment


      • #78
        However, when I run the executable, I just get a blank screen...
        That's the last thing I got as well this morning. But I also got a database error (some txt file missing, probably because my directory structure is messed up by the mods). I had to leave for work then, so couldn't test further, but I'm guess installing a clean copy of the data folder from the CD might solve that, at least for me...
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #79
          The black screen may be caused because you are running the debug version. The release and final versions work for me.

          However, it took some extra work to build those, because the production rules for most of the lex and yacc files were missing in the projects. You have to right-click on the individual files, select Settings, go to the Custom Build tab, and copy the Commands and Output fields from the debug version. Here is the list of files to check:

          ctp2\gs\slic\slic.l
          ctp2\gs\slic\slic.y
          ctp2\gs\slic\sliccmd.l
          ctp2\gs\slic\sliccmd.y
          ctp2\gs\newdb\DBlexer.l
          ctp2\ui\ldl\ldl.l
          ctp2\ui\ldl\ldl.y
          dbgen\ctpdb.l
          dbgen\ctpdb.y

          And, of course, you have to apply the modifications to the final Link step - e.g. removal of the Miles library -
          again for each project.

          Comment


          • #80
            I have succesfully compiled the debug version to the point where I can get a blank screen.
            Solver, WePlayCiv Co-Administrator
            Contact: solver-at-weplayciv-dot-com
            I can kill you whenever I please... but not today. - The Cigarette Smoking Man

            Comment


            • #81
              Fromafar,

              Strange, I didn't have to do that. The release version built just fine for me (that's actually the one I was referring to in my last post) Then again, I didn't have time to run it properlyl yet, so I might have screwed up something, I'll test it in a few minutes...
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #82
                I have successfully run the release version. I didn't have to alster the custom build settings for the yacc/lex files since they have already been built, and the IDE didn't bother to build them again.

                The first thing I noticed was a great many SLIC errors in the SAP SLIC files (several of the functions used therein were not recognised, like ArmyIsValid), so I switched back to the original game.

                The only other problem I had was that the game refused to recognise my CD (although it did manage to read the intro movie from it) and so I had to remove the CD check. I guess this is because my copy of the CD is scratched to the point where the verification fails (it seems to be checking the track lengths).

                I used the /rnd command to play through about 100 turns without notable problems, but when I quit I got an error (probably related to those assertion errors DDowell was getting, but because my build is not a debug build it just appears as a general error).

                Comment


                • #83
                  Originally posted by Solver
                  I have succesfully compiled the debug version to the point where I can get a blank screen.
                  I have the debug version working under VS.NET...one thing to note is that it spends a Looooong time initializing when running the debug build.
                  My machine is 2.6Ghz but it still took many minutes to get past the initialization and display more than the blank screen.

                  Martin.
                  I think therefore I CIV

                  Comment


                  • #84
                    Originally posted by J Bytheway
                    The only other problem I had was that the game refused to recognise my CD (although it did manage to read the intro movie from it) and so I had to remove the CD check. I guess this is because my copy of the CD is scratched to the point where the verification fails (it seems to be checking the track lengths).
                    Once I had this problem with the original game, a restart of my computer helped.

                    So far I am down to one error after a successless installion of DIrectX 9 and a successfull DirectX 8 installation, I have this problem:

                    Code:
                    Kompilieren...
                    lex.sc.c
                    lex.yy.c
                    fatal error C1083: Quelle-Datei kann nicht geoeffnet werden: 'C:\Activision\Ctp2\ctp2_code\gs\slic\lex.yy.c': No such file or directory
                    it looks like the lex.yy.c is build successfully, but it claims there is no such file in the slic directory, and I can't find it there. I find a version of it in the C:\Activision\CTP2\ctp2_code\gs\dbgen folder but I doubt it is the right version so how can I build it manually?

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

                    Comment


                    • #85
                      I failed the CD check on the Final version as well, and my CD is in pretty good condition as far as I can tell. Intro movie played fine for me as well.

                      I guess this is the first thing we'll have to fix if we want to release any patches, 'cause without a CD check the EULA would be violated...
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #86
                        Originally posted by Martin Gühmann
                        Once I had this problem with the original game, a restart of my computer helped.
                        I'll try that.

                        So far I am down to one error after a successless installion of DIrectX 9 and a successfull DirectX 8 installation, I have this problem:

                        Code:
                        Kompilieren...
                        lex.sc.c
                        lex.yy.c
                        fatal error C1083: Quelle-Datei kann nicht geoeffnet werden: 'C:\Activision\Ctp2\ctp2_code\gs\slic\lex.yy.c': No such file or directory
                        it looks like the lex.yy.c is build successfully, but it claims there is no such file in the slic directory, and I can't find it there. I find a version of it in the C:\Activision\CTP2\ctp2_code\gs\dbgen folder but I doubt it is the right version so how can I build it manually?
                        Those two files come from the flexing of sliccmd.l and slic.l respectively - see the custom build settings for these two files.

                        Comment


                        • #87
                          Costum build setting where can I find this option, John?

                          Currently I am trying to compile the Release version instead of the debug version.

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

                          Comment


                          • #88
                            I tried rebooting, nogo.

                            I seem to have a bit of another problem though. On the Release and Debug builds, the game crashes to desktop as soon as the a new game is done loading.

                            On the Debug build I get this:

                            Debug Assertion Failed!

                            Program: D:\Games\Activision\source\ctp2_code\CivCTP_dbg.ex e
                            File: D:\Games\Activision\source\ctp2_code\gs\fileio\Gam eFile.cpp
                            Line: 2093

                            Expression: g_soundManager != NULL
                            I guess I must have outcommented a bit too much
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #89
                              one thing to note is that it spends a Looooong time initializing when running the debug build.
                              I didn't have this problem (with VS6) at all. It loaded just as quickly as the other builds for me...
                              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                              Comment


                              • #90
                                Originally posted by mjs0
                                I have the debug version working under VS.NET...one thing to note is that it spends a Looooong time initializing when running the debug build.
                                My machine is 2.6Ghz but it still took many minutes to get past the initialization and display more than the blank screen.
                                Patience is indeed required. It took ~7 minutes on my machine, but then you do get a bunch of debugging messages printed to the screen.

                                I got a couple of assertion errors in GameFile.cpp line 2093 where the non-NULLity of the sound manager is asserted, so I commented that one out, and then another (possibly the first of many) as I quit. Curiously, at the same time Control Panel popped up an error, but I think the two were unrelated.

                                Comment

                                Working...
                                X