Announcement

Collapse
No announcement yet.

PROJECT-> C++ Compiler: Which one?

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

  • PROJECT-> C++ Compiler: Which one?

    Suggest a C++ Compiler that should be used as the default one for compiling the source code and any changes made in it.

    Please, only post if you are a programmer, professional or amateur, have a knowledge of C++ and have used a C++ Compiler before.

    The original code was compiled with Microsoft Visual C++ 6.0. As far as I know it is unknown on what Service Pack, if any.

    The trend right know are the Microsoft Visual C++ 6.0 and Visual C++ .NET and in a first look that would seem like the best solution to secure as much compatibility and less problems as possible.

    A good idea would be a free compiler also, ANSI compliant, so that future porting to different operating systems be easier, or possible for programmers that don't have access to Microsoft Visual C++ or don't won't to work on it.

    Note that we must decide on a common accepted compiler as if we start compiling in different compilers, each one on his/her own, could lead to incompatibilities and additional work and work arounds.

    Related threads:

    Getting the source to compile
    Getting the source to compile on VS.NET
    Tools for documentation and development
    compiler program
    Linux Port

  • #2
    There are two decent options, IMO. One is Visual C++ 6. The big upside is that it's what was originally used for development, and that we have succeeded in compiling the game with it, and getting it to run. .NET does provide some neat stuff, but it seems that a lot of additional work needs to be done to port the source into it. Seeing how Visual C++ .NET costs a lot of money, just like version 6, it's not our priority, I think. This does, though, leave the people with .NET only in a bad state somewhat.

    gcc is a good choice. It is, after all, a free compiler, and a pretty decent one. It does even understand some code that might have been written with Visual C++ in mind, code that other compilers wouldn't understand. But again, our coders would have to do a fair amount of work to configure the makefile and figure out how to get the source to compile under gcc.

    Provided that porting to gcc can be done within a reasonable timeframe, it could be a very solid option, mainly because of the compiler's availability.
    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


    • #3
      Please, include a description and the reasoning behind your suggestion, and link(s) to the developer/service, if any.

      Comment


      • #4
        GCC Compiler Page

        Microsoft Visual Studio

        Recommended site about .NET
        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


        • #5
          Why choose? I'd say let's make it work with as many compilers as possible (using #ifdefs where needed) and just use whichever one we prefer...
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #6
            In my opinion it should be a priority to decide on a common accepted compiler. How much time it will take is secondary right now as long as it is not off limit. It could save surprises and much more time in the future. Besides the more you work on making the code compile the more you'll get familiar with it.

            Comment


            • #7
              I'd recommend Visual Studio 6.

              1) Because I have it
              2) Because I don't need .NET, and don't have any plans to buy it, without a more concrete reason than game debugging
              3) Because we know it was used to develop CTP2, plus it works
              4) Because time spent porting to other compilers could be time spent working on this.

              I don't see why one group of [strike]zealots[/strike] programmers could work on porting it to gcc.. especially with a view to getting it to port to linux. The same goes for VS.Net (although I think this will be an easier task)

              Comment


              • #8
                Locutus, anyone is welcomed to make the code compile to as many compilers available out there as possible but when we will actually start fixing the bugs and after that improve the code and add new features as a team we will surely need to use the same compiler. The sooner we start this discussion the better.

                Comment


                • #9
                  What do you want to do? If you choose .NET, everyone will just have to shell out for a $100 copy of the software or get out of the project? If you choose a single compiler, it'll have to be freeware, basically only leaving gcc (and porting to gcc may not be trivial, which could mean we'd only be stuck trying to get the game to run for even longer than we already have).

                  With a few #ifdefs everyone, regardless of what compiler they have, can contribute to the project -- I don't anticipate that this would cause a lot of problems.
                  Last edited by Locutus; November 6, 2003, 17:23.
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    As MrBaggins says, fixing bugs and porting to other compilers/platforms can happen simultaneously -- that's what we're doing now.
                    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                    Comment


                    • #11
                      I can see two ways to support both systems...

                      1) Make sure that the code compiles on both gcc and vc++ even though it's a pain. Make official releases in whichever is faster or smaller. Note that the object code produced by one compiler is not compatible with another, so for example dll's cannot be swapped between the two builds.

                      2) Support only gcc but provide a workspace and a gnu compilation tools so that MS fanboys can use their own IDE. This would be nice, but who's going to do it? Gnu-users usually care little about VC++ and vice versa. And microsoft is not particularly famous for cross-compilation.

                      Comment


                      • #12
                        OK... someone familiar with gcc and SDL correct me if I'm wrong.

                        Currently the DirectX stuff works on Visual C++/Net. Its not directly usable under Linux, (I.E. not directly emulated?)

                        The conversion process for that to SDL isn't instant. Its going to take some significant amount of work, delaying the beginning of real work on fixing it.

                        The game state is separate from the UI.

                        Visual Studio users could actually get to work, getting the game state to a proper place.

                        When the gcc/linux team had gotten to the point of everything running, they could incorporate the changes that had been made on gamestate, and start work on their own.

                        Comment


                        • #13
                          MrBaggins,
                          Yeah, basically you're correct and I agree with you.

                          One thing though: There's also a gcc for windows, and I *think* that that version does support DirectX, but I have zero experience with that and I doubt many others here do. It may well still involve a good deal of work to get the code working on gcc for win. So I agree we should get the Visual Studio (.NET and 6.0) team to just start working, and incorporate any changes made later.
                          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                          Comment


                          • #14
                            Locutus, it is not what I want. I'm not even sure if I get involved with programming the code at all. It is what programmers, that will join the team, want. You want to work on two compilers? If that is functional and will not cause problems in the future that would be fine I guess. I'm quite curious though what will happen when we will actually start adding or making improvements in the code. Or when we'll make a package for download with several files compiled in different compilers.

                            If the adjustments from compiler to compiler are minor and easy to make we can fix this by assigning a programmer lead who will make the adjustment in the compiler he/she uses in any file contributed and compiled in a different compiler, recompile and pack it ready for download.

                            Regardless of that please continue suggesting compilers.
                            Last edited by Keygen; November 6, 2003, 18:01.

                            Comment


                            • #15
                              I'm quite curious though what will happen when we will actually start adding or making improvements in the code.
                              Most of the changes we'll make will be in the core of the game engine: stuff that affects the cities, units, etc. Most/all of that stuff should all be platform independent and work just as easily on a Mac as on gcc for Windows as on Visual Studio .NET.

                              Or when we'll make a package for download with several files compiled in different compilers.
                              We won't. Whoever is the one to put out the package will use his own compiler to build all files. In executable form, noone should have problems running the game, as long as all EXE and DLL files were compiled with the same compiler. Of course, different people may end up releasing different versions of the game, so various versions may not be compatible with each other, but this is to be expected anyway.
                              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                              Comment

                              Working...
                              X