Announcement

Collapse
No announcement yet.

PROJECT-> C++ Compiler: Which one?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I'm all for keygen's idea. We should decide on one primary compiler and all released source files from apolyton should be able to compile on it.

    I suggest we use VC++ since
    -it is a more widespread compiler than the .NET version
    -the original game was compiled on it.
    -it actually compiles for a number of persons (myself included).

    But the people with .NET will probably have another view on this
    So much to do in so little time...

    Comment


    • #17
      gcc for Windows

      Did start with this one and managed to create some DLLs from the source in the mapgen directory. Haven't tested if these actually work, because I wanted to get an overview first. Without a suitable IDE this will be quite difficult.

      Comment


      • #18
        One thing to keep in mind is that us linux folks are going to get this so g++ can compile it regardless, so perhaps this discussion is a non-issue.

        Yes, getting it to compile on g++ will take a lot of work.

        Have the windows programmers used cygwin?



        If you don't have msdev, check it out. Even if you do have msdev, cygwin has all the tools we have on linux, bash, sed, grep, awk, patch, diff, g++ and make. You can get cvs through the cygwin package system too.

        Comment


        • #19
          I thought it was somehow obvious but I guess I made a mistake.

          It is natural and inevitable to some point that several people either from Apolyton or from every other place would sooner or later download the code and make their changes to it. I don't suggest to control that or even do anything to limit it. Actually it is more than welcomed.

          My intention was toward the team that will be formed here, in these threads and will work together.

          Apolyton is the entry point currently for finding the source code and usuful information. Discussions will continue taking place between people interested in modifying the code whether they will be in a team or on their own. And it will remain that way. But on the same time we can, and we should form a team, organize somehow the way it will work and perhaps put some rules as well.

          I question myself and everybody here. Wouldn't be better this team to have a primary compiler?

          Comment


          • #20
            If a single compiler is wanted, then it has to be gcc. It should be possible to make it work under both cygwin and linux compiled from gcc relatively easily once either one of these has been achieved.

            Personally, I would rather stick with VC++ 6 for primarily selfish reasons. I have this, and I have the code compiling without any notable problems on it. As Locutus said, the vast majority of changes which are intended to fix/enhance the game will not conflict with changes to expand or alter the compiler options. The notable exception here would probably be interface design, which may not be implemented in such a way to make this easy (due to it using DirectX calls). We should, however, be able to alter things so that it is implemented in a nice way.

            What I would really like to do is port the entire game to a more modern language like C# which will compile under the MS .NET compiler (which is available free, and seperate free IDEs are also available (http://www.icsharpcode.net)) or under the Mono compiler in a linux environment (http://go-mono.com). However, this is hopelessly impractical since it would involve rewriting the entire game, and it would probably be better to write a new game inspired by CTP2, which would not be restrained by the EULA. I can still dream, though .

            Comment


            • #21
              Well, as I dont have windows on my machine, my only options is to try it with gcc. I already got some files compiled, but the problem is, that there quite some sloppy code, accepted by vc++, but not by g++.

              I am currently trying to compile civ_main.cpp and i am getting LOTS of errors (I had to double my console buffer so that the first errors can still be seen.

              [EDIT] Oh, and by the way, not everything can be made with #ifdef, because some code needs to be moved around, because of circular dependencies.
              Last edited by uppi; November 7, 2003, 12:27.

              Comment


              • #22
                I would probably do some debugging if I could get the code to compile on a free compiler (read gcc) under windows. I will definitely never buy MSDev C++ at home, nor .NET.
                Clash of Civilization team member
                (a civ-like game whose goal is low micromanagement and good AI)
                web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                Comment


                • #23
                  I would much prefer to use GCC but i will support starting up with VC++ 6 to get things going.

                  Comment


                  • #24
                    My opinion is that you'll never get everyone to agree on a standard. You'll have the best luck (for now) with Visual C++ 6.0, simply because that's what we used to write it in the first place. The people who want to use GCC or .net will be motivated to fix up the code to work for them. And hopefully, do it in a way that doesn't break the others, so that after time it becomes a cross compiler project.

                    But trying to enforce any standard other than GCC is kinda far fetched, because people aren't going to spend hundreds (or for the "pro" version, thousands) of dollars to work on this. At the same time, trying to standardize on GCC would take weeks of effort to just get everything working "right", time that could be spent focusing on other things.

                    Pyaray

                    Comment


                    • #25
                      That is true Pyaray. That is actually the conclusion I tend to come to after I have read all posts here and the progress that has already been done in different compilers. I am currently working on a solution to merge this two, the use of a standard compiler and the use of different compilers.

                      Comment


                      • #26
                        Locutus said what seems to be the best solution... it's the #ifdef directives. I only have to hope that there wouldn't be too many differences between the VC and GCC code.
                        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


                        • #27
                          Originally posted by uppi
                          [EDIT] Oh, and by the way, not everything can be made with #ifdef, because some code needs to be moved around, because of circular dependencies.
                          Surely you can still handle that with #ifdefs, you just need to have two copies of the code that moves around (or you could make it a macro to avoid code duplications...)

                          Comment

                          Working...
                          X