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

  • Ok, I finally got this:

    Code:
    --------------------Configuration: ctp2 - Win32 Final--------------------
    Linking...
    
    ctp2.exe - 0 error(s), 0 warning(s)
    that was it, no compiling like before and it was kind of fast. Its 7.26 MB bigger than the recent build. Should I have any concerns?
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • Your last errors were linker errors and so it only needs to link the files, which is quite fast. I'm unsure about where that extra 7.26MB comes from if it's a Final build though.
      Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
      -Intercal reference manual

      People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

      Comment


      • That's not a problem, the game may run a little bit slowly. That's because you use a introductory version of VC++ 6.0, that comes with this little disclaimer message, when you start the program. In addition they removed all the optimization features therefore the warnings about the unknown compiler options. One of these features is to optimize the executable size that is missing.

        And for the no compiling like before: You are right there was no compiling, the compiler already compiled everything to *.obj files you can find in the final subfolder of the project's folder. The only thing that was done was to link everything together.

        By the way now you can start to test your code and check weather it compiles on your own.

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

        Comment


        • Great!

          I was in the middle of uploading it to see if you guys wanted to double check it, here's the link anyways (it revision 407)


          Martin, as for testing and cmpiling my code does my introductory version tell me where or what the problem is? Or because its introductory it leaves that out?

          thanks

          E
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment


          • Originally posted by E
            Martin, as for testing and c[o]mpiling my code does my introductory version tell me where or what the problem is? Or because its introductory it leaves that out?
            The only difference between the introductory version and the full version is that you are not allowed to build commercial programs. And to make sure that you can't do this, they removed all the optimization stuff, and added this nice disclaimer popup message. It isn't very professional if your program has such a popup or is slow.

            If your code contains syntax errors, then even this crippled version of VC++ tells you that and where you can find the problem.

            Of course if it contains other bugs it copiles for instance something like this:

            Code:
            while(true){
                // Some code
                if(something_that_is_always_false_but_is_supposed_to_be_a_variable){
                    break;
                }
            }
            Of course the compiler doesn't notice that the loop will never terminate, even if the loop body is empty.

            Maybe the optimizer can recognize that the loop does noting and removes it. And then you wonder why the debug version hangs but not the final version.

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

            Comment


            • the latest revision 474 I had this problem when compiling:

              Code:
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(629) : error C2065: 'AUI_KEYBOARD_KEY_UPARROW' : undeclared identifier
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(629) : error C2051: case expression not constant
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(634) : error C2065: 'AUI_KEYBOARD_KEY_LEFTARROW' : undeclared identifier
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(634) : error C2051: case expression not constant
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(639) : error C2065: 'AUI_KEYBOARD_KEY_RIGHTARROW' : undeclared identifier
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(639) : error C2051: case expression not constant
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(644) : error C2065: 'AUI_KEYBOARD_KEY_DOWNARROW' : undeclared identifier
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(644) : error C2051: case expression not constant
              F:\SVN-Code\trunk\ctp2_code\ctp\civ3_main.cpp(649) : warning C4060: switch statement contains no 'case' or 'default' labels
              Formerly known as "E" on Apolyton

              See me at Civfanatics.com

              Comment


              • Originally posted by E
                the latest revision 474 I had this problem when compiling:
                I got this problem as well, for now you can go to the according lines and restore these lines as they were in revision 473.

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

                Comment


                • Originally posted by E
                  the latest revision 474 I had this problem when compiling:
                  Thanks for the report, E. I forgot to commit a file in revision 473. With revision 475, you should be able to compile again.

                  Comment


                  • I'm gettinga huge amount of warnings when I compile. its still compiling bt it throws up warnings from a lot of differrent files. I'll try to post the plg but its 6MB. What happened?
                    Formerly known as "E" on Apolyton

                    See me at Civfanatics.com

                    Comment


                    • I fixed the warnings but doing the CLEAN command.

                      However, I get a commit error on one of my files it says

                      commit failure inconsistent newlines


                      how do i fix that and what does it mean by new lines?
                      Formerly known as "E" on Apolyton

                      See me at Civfanatics.com

                      Comment


                      • Originally posted by E
                        I fixed the warnings but doing the CLEAN command.

                        However, I get a commit error on one of my files it says

                        commit failure inconsistent newlines

                        how do i fix that and what does it mean by new lines?
                        The 'newlines' are the characters used to split one line from the next in a text file. What characters are used varies according to your operating system. You can make the newlines consistent by running a program like unix2dos on the file in question (There should be a copy in the repository in the bin directory).

                        Comment


                        • dos2unix.exe is in the bin, is this what you meant? or should i look for unix2dos?

                          i did try running it from the one in th ebin from the command prompt and i put player.cpp for safe keeping but then i just got a crash
                          Formerly known as "E" on Apolyton

                          See me at Civfanatics.com

                          Comment


                          • I would have thought that both unix2dos and dos2unix would be there, but if there's only dos2unix, that will suffice. It should work with a command like:
                            Code:
                            dos2unix player.cpp
                            but if the executable is not on your path you may have to move to the directory with it in and do
                            Code:
                            dos2unix path\to\player.cpp

                            Comment


                            • i put player in the bin directory so they are matched up and still got the crash and nothing happened.

                              i di hit debug and it was saying not found in dll stuff
                              Formerly known as "E" on Apolyton

                              See me at Civfanatics.com

                              Comment


                              • well i got this



                                and ran it, no crash. I'll see if i can commit it tonight
                                Formerly known as "E" on Apolyton

                                See me at Civfanatics.com

                                Comment

                                Working...
                                X