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

  • I think berXpert knows very well what autoexec.bat is, but he was trying to convey the complete irrelevance (if not non-existance) of that file in WinXP.

    See Mr Ogre's post earlier in this thread on how to do that step in WinXP.
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • well i hate reading five pages of forum posts
      "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




      • As I noted a smile on your face I though you were joking.

        I don't edit that file, just add those lines to my System Variables

        Comment


        • I think he was joking Big Mc
          At list that is the impression I got

          BTW, autoexec.bat is not needed to be altered in Windows Operating systems with the NT kernel. You can set environmental variables instead.

          EDIT: I skiped this page and obviously didn't read the posts that followed

          Comment


          • I can't build ctpdb.exe. One problem seems to be that lex.yy.c (which doesn't exist at this point) is both an input and an output. How did you guys overcome this?

            Comment


            • Originally posted by Peter Triggs
              I can't build ctpdb.exe. One problem seems to be that lex.yy.c (which doesn't exist at this point) is both an input and an output. How did you guys overcome this?
              Which one do you mean, Peter. There are two of them one in ..\ctp2_code\gs\dbgen\ and one in ..\ctp2_code\gs\slic\. And note these files have the same name but not the same content I tried to replace the slic one by the dbgen one and it doesn't work. What I know is that the slic one is built when you compile another version of the *.exe first the file is built. Unfortunatly I don't have any idea why the file isn't saved in the debug configuration.

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

              Comment


              • flex is a tool for generating scanners: programs which recognized lexical patterns in text. flex reads the given input files, or its standard input if no file names are given, for a description of a scanner to generate. The description is in the form of pairs of regular expressions and C code, called rules. flex generates as output a C source file, `lex.yy.c', which defines a routine `yylex()'. This file is compiled and linked with the `-lfl' library to produce an executable. When the executable is run, it analyzes its input for occurrences of the regular expressions. Whenever it finds one, it executes the corresponding C code.
                Here's the whole top page: http://dinosaur.compilertools.net/

                So one will be for the database files and the other for the slic files (but I haven't got there yet, cause I can't get past the bloody database).

                Comment


                • Maybe it helps if you use other project files you can find my project files in the attachment, if you haven't installed the source code in the C:\activision\CTP2\ folder you have to open them and replace all occurences of C:\activision\CTP2\ by the according path of your CTP2 source code installation. By the way I figuered out why the second version of the lex.yy.c wasn't build under debug conditions. It looks like I cut the flex command out when I adjusted the path. civctp.dsp should go into the ..\ctp2_code\ctp\ folder and dbgen.dsp should go into the ..\ctp2_code\gs\dbgen\ folder.

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

                  Comment


                  • Well looks like I have uploaded the wrong file, it just contains the CTP2 project file and not the dbgen project file. Here is the file I intended to upload actually.

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

                    Comment


                    • I did a comparison of my dbgen.dsp with yours and the only difference is that the paths to flex differ (because my Activision folder is in C:Program Files).

                      Could you zip up lex.yy.c, y.tab.c, and y.tab.h and I'll stick them in the dbgen folder and see what happens.

                      Comment


                      • The attachment should contain the files from the dbgen folder you requested, Peter.

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

                        Comment


                        • 17. In the “File View” tab of the project window in the left-hand corner, expand the files under “dbgen files”. Right-click “ctpdb.y” and select “Settings…” and click the “Custom Build” tab. In the “Commands” dialogue box, replace “$(CDKDIR)” with “C:\Activision\CTP2\bin”. In the dialogue box to the left, do the same for “ctpdb.l”. Click “OK” to close the dialogue box.
                          i think i get the same error around step 17 it comes up with one error
                          "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


                          • Originally posted by The Big Mc
                            i think i get the same error around step 17 it comes up with one error
                            So could you post the error message The Big Mc?

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

                            Comment


                            • Success!!!

                              At least now I have a ctpdb.exe.

                              Thanks Martin.

                              Comment


                              • For future reference: If your flex was in Program Files then you need to replace that with Progra~1 in the path. It can't handle spaces.

                                Comment

                                Working...
                                X