Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt on Windows - What is your experience?
QtWS25 Last Chance

Qt on Windows - What is your experience?

Scheduled Pinned Locked Moved General and Desktop
13 Posts 5 Posters 5.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #3

    PS:
    Compared to the performance on MinGW on Windows, GCC on Linux is really fast. The culprit might be the virus scanner I have on Windows. No decent way to turn it off, though.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #4

      Hi Asperamanca,

      I don't have any experience with MSVC, but I would agree that compiling with GCC on Windows is much slower than on Linux (and Mac OS X for that matter). Still, and as much as possible, I would like my setup to be easily reproducible and I would like to keep conflicts between compilers/platforms to a minimum, hence I am currently using GCC on Windows. However, I am open minded, so should there be good arguments in favour of switching to MSVC, then I will eat the bullet and do it (even though I feel like it might a bit of work).

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #5

        There are also advantages in using different compilers: They are pedantic about different things, and result in different warnings. This might slightly improve code quality.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          agarny
          wrote on last edited by
          #6

          True, but this is already the case in some way with using GCC on different platforms, especially since it's version 4.4.0 on Windows while a much newer version on Linux for example. So, there have been cases where I would get no warning on Windows and some on Linux.

          Anyway, I would be interested to know what people's experience of MSVC compared to GCC has been on Windows. Especially if, for whatever reason, they have to support both compilers.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #7

            I have had only a few small issues in using both compilers on windows. MSVC does result in faster code on the whole though. The small issues I had, mostly resulted in cleaner code on the whole.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              agarny
              wrote on last edited by
              #8

              Thanks Andre. I have had a quick look at Qt + MSVC2010 using /Wall because I don't want warnings, but I ended up getting more than a thousand of them (!!). Then, I found out (here: "http://stackoverflow.com/questions/4001736/what-with-the-thousands-of-warnings-in-standard-headers-in-msvc-wall":http://stackoverflow.com/questions/4001736/what-with-the-thousands-of-warnings-in-standard-headers-in-msvc-wall) that /W4 ought to be preferred to /Wall. Yet, I still get a few Qt-specific warnings (e.g. "http://stackoverflow.com/questions/2742514/qt-warning-level-suggestion":http://stackoverflow.com/questions/2742514/qt-warning-level-suggestion). I was therefore wondering what you were doing with regards to warnings generated by MSVC2010 (or whatever version you use)? Do you do what is mentioned in the last link I gave above?

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lgeyer
                wrote on last edited by
                #9

                I'm primarily using GCC 4.7 on Windows without any problems so far. The "MinGW64":http://mingw-w64.sourceforge.net/ project provides up-to-date distributions of GCC 4.6.x and GCC 4.7 for i686 and x86_64 (I would recommend the personal build of rubenvb).

                The reasons for GCC are easily explained:

                • A homogenous build environment on all supported platforms, from Linux to Mac OS X to Windows to Android or any other mobile platforms.
                • The installation is as simple as extracting an archive, which leaves me with a complete, uninstrusive and independent build environment that I can freely move around. One could even integrate the build environemnt into the repository if neccessary.
                • It is free in terms of cost, the license and most importantly distribution. There is no problem in distributing the build environment along with the source code of the application. Although MSVC is free for commercial applications, I still have to force the foreign developer to download and install either Visual Studio or the Windows SDK.
                • And finally for me the most important reason, active development. It becomes more and more apparent that Microsoft silently moves away from C++ and (at least for now) focuses on absurdities like Managed C++ or C++/CLI. The improvments for MSVC2011/12 over MSVC2010 are moderate, C++11 support is a downright joke, especially when considering that C++11 in MSVC2010 was mediocre at best.

                [quote author="Andre" date="1333633664"]MSVC does result in faster code on the whole though.[/quote]
                If "latest tests":http://translate.googleusercontent.com/translate_c?sl=fr&tl=en&u=http://www.hardware.fr/articles/847-15/moyennes.html are to be believed the difference is de facto negligible. If you are looking for performance Intel is the way to go anyway.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  agarny
                  wrote on last edited by
                  #10

                  Thanks for this Lukas. A few questions/comments if you don't mind:

                  I am wondering why the Qt guys are not supporting a more up-to-date version of MinGW. Is there any particular reason? In fact, the version they ship with the Qt SDK is patched, but maybe there would be no need to patch if they were to use a more recent version...?

                  I imagine you have to build Qt from scratch and can't just use the MinGW version of the Qt SDK out of the box?

                  Something I noticed in my very early tests with MSVC is that compilation is much faster and the size of the files much smaller. On the other hand, to set up a Qt/MSVC environment is rather time consuming compared to Qt/MinGW.

                  Regarding MinGW64, what is the difference between the different builds?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #11

                    [quote author="Lukas Geyer" date="1333663676"]
                    [quote author="Andre" date="1333633664"]MSVC does result in faster code on the whole though.[/quote]
                    If "latest tests":http://translate.googleusercontent.com/translate_c?sl=fr&tl=en&u=http://www.hardware.fr/articles/847-15/moyennes.html are to be believed the difference is de facto negligible. If you are looking for performance Intel is the way to go anyway.[/quote]

                    For the code I was working at at the time, it made quite a difference. I don't care about a generic comparison, I care about the code I work on. To know what works best for you, you'll have to test for your own situation.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #12

                      We've switched from MSVC to MinGW recently on our commercial project due to the much more easier setup of the application at the users' sites. It is very hard to deploy an MSVC based application with the runtime dependencies (vcredist stuff) without administrator rights on the deployment box. Actually, I never managed to make this work. With MinGW, on the other hand, that's a no brainer, just copy all needed DLLs into the application directory and you're done.

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        lgeyer
                        wrote on last edited by
                        #13

                        [quote author="DocOx" date="1333668362"]# I am wondering why the Qt guys are not supporting a more up-to-date version of MinGW. Is there any particular reason? In fact, the version they ship with the Qt SDK is patched, but maybe there would be no need to patch if they were to use a more recent version...?[/quote]

                        Honestly, I don't know (but I heard the same rumors) - but I understand that switching the default toolset does in fact require some work (mostly testing) and that almost everyone is now primarly focusing on Qt 5, which (so I guess) will bring GCC 4.6.2 and/or GCC 4.7 (which are the recommended GCC versions for Qt5 alpha).

                        [quote author="DocOx" date="1333668362"]# I imagine you have to build Qt from scratch and can't just use the MinGW version of the Qt SDK out of the box?[/quote]
                        Yes.

                        [quote author="DocOx" date="1333668362"]# Something I noticed in my very early tests with MSVC is that compilation is much faster and the size of the files much smaller. On the other hand, to set up a Qt/MSVC environment is rather time consuming compared to Qt/MinGW.[/quote]
                        Subjectively I would say GCC (or better MinGW) might be slower, but not much slower (although I haven't verified this). The same goes for file size, which even doesn't bother in (m)any of my use cases.
                        @
                        MSVC MinGW 4.4 MinGW 4.7
                        QtCore4.dll 2.498 KB 2.777 KB 3.035 KB
                        QtGui4.dll 8.366 KB 9.898 KB 11.028 KB
                        @
                        [quote author="DocOx" date="1333668362"]# Regarding MinGW64, what is the difference between the different builds?[/quote]
                        The basically differ in the GCC version used, the amount of SDK headers included, the exception model, or whether they are prefixed or not (x86_64-w64-mingw32-gcc.exe vs. gcc.exe). I've found the personal build of rubenvb the most recent and feature complete so far plus it is non-prefixed (and so works as a drop-in replacement for the MinGW delivered with the SDK).

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved