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. How can I select a compiler version that's compatible with my Qt version?
QtWS25 Last Chance

How can I select a compiler version that's compatible with my Qt version?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 5.0k 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.
  • J Offline
    J Offline
    James Kuyper
    wrote on 3 Aug 2018, 18:46 last edited by
    #1

    I may have installed Qt incorrectly; if so, I'll need instructions on how to correct the installation.
    When I select Tools/Options/Kits,
    under the Qt Versions tab, I see two versions:
    Qt 5.11.1 MSVC2017 64bit
    Qt 5.11.1 for UWP 64bit (MSVC 2017)

    Under the Compilers tab, I see 6 compilers
    Microsoft Visual C++ Compiler 14.0 (xxx), where xxx is any one of the following:
    x86, amd64_x86, amd64, x86_amd64, x86_arm, amd64_arm

    Under the Kits tab, every combination I've tried of compiler and Qt version has problems. When I select x86, a mouseover of the kit shows a yellow window saying that the compiler and Qt have different ABIs. When I select any of the other compiler options, the yellow window always says "The compiler (compiler name) may not produce code compatible with Qt version (Qt version name)".

    What do I need to do to have a compiler that will produce code compatible with Qt? I'm using 64-bit Windows 10 on an x64-based processor.

    J 1 Reply Last reply 4 Aug 2018, 09:41
    0
    • B Offline
      B Offline
      Buckwheat
      wrote on 3 Aug 2018, 19:37 last edited by
      #2

      Hello @James-Kuyper and Welcome!

      You ask the most common but also the most frustrating to answer question. It is akin to... "For what purpose do I exist?"

      But seriously, I tend to avoid M$ compilers and use MSYS2 as my development platform. This gives me the best and most up-to-date compiler to target both i686 and x86_64 based platforms. This also keeps me constrained from M$isms that keep me from being able to target linux, MacOS, etc.

      From the information you have given, I would say that you installed Qt for M$VC2017 and you actually have M$VC2015 compiler. Try reinstalling Qt but install MSVC2015.

      If you like developing under linux and choose to try MSYS2, I have install topics available.

      Enjoy!

      Dave Fileccia

      J 1 Reply Last reply 7 Aug 2018, 13:42
      1
      • J James Kuyper
        3 Aug 2018, 18:46

        I may have installed Qt incorrectly; if so, I'll need instructions on how to correct the installation.
        When I select Tools/Options/Kits,
        under the Qt Versions tab, I see two versions:
        Qt 5.11.1 MSVC2017 64bit
        Qt 5.11.1 for UWP 64bit (MSVC 2017)

        Under the Compilers tab, I see 6 compilers
        Microsoft Visual C++ Compiler 14.0 (xxx), where xxx is any one of the following:
        x86, amd64_x86, amd64, x86_amd64, x86_arm, amd64_arm

        Under the Kits tab, every combination I've tried of compiler and Qt version has problems. When I select x86, a mouseover of the kit shows a yellow window saying that the compiler and Qt have different ABIs. When I select any of the other compiler options, the yellow window always says "The compiler (compiler name) may not produce code compatible with Qt version (Qt version name)".

        What do I need to do to have a compiler that will produce code compatible with Qt? I'm using 64-bit Windows 10 on an x64-based processor.

        J Offline
        J Offline
        JKSH
        Moderators
        wrote on 4 Aug 2018, 09:41 last edited by JKSH 8 May 2018, 00:06
        #3

        First, try "Qt 5.11.1 MSVC2017 64bit" with the amd64 compiler and ignore the compatibility warning.

        Are you able to build and run an example app?

        @James-Kuyper said in How can I select a compiler version that's compatible with my Qt version?:

        Qt 5.11.1 MSVC2017 64bit

        This is for traditional desktop applications.

        Qt 5.11.1 for UWP 64bit (MSVC 2017)

        This is for Universal Windows Platform apps (the Windows 10 version of "Metro" apps).

        Under the Compilers tab, I see 6 compilers
        Microsoft Visual C++ Compiler 14.0 (xxx), where xxx is any one of the following:

        This is MSVC 2015. In theory, it is fully compatible with MSVC 2017.

        x86, amd64_x86, amd64, x86_amd64, x86_arm, amd64_arm

        Since you downloaded 64-bit Qt, then you want to use the 64-bit compiler (amd64).

        x86 is 32-bit.

        _arm refers to a cross-compiler for ARM CPUs (which are found in mobile phones and embedded devices like Raspberry Pi).

        When I select x86, a mouseover of the kit shows a yellow window saying that the compiler and Qt have different ABIs.

        That's expected, because you cannot mix 32-bit and 64-bit binaries.

        When I select any of the other compiler options, the yellow window always says "The compiler (compiler name) may not produce code compatible with Qt version (Qt version name)".

        Qt Creator does not realize that MSVC 2015 is compatible with MSVC 2017, so ignore the warning for now and see if it works.

        If it doesn't work, you could try upgrading your compiler to MSVC 2017, rebooting, then trying again.

        If that still doesn't work, follow @Buckwheat's suggestion and install the MinGW 5.3.0 compiler (through the Qt Maintenance Tool). You will also need to uninstall "Qt 5.11.1 MSVC2017" and install Qt 5.11.1 MinGW 5.3.0 instead.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        J 1 Reply Last reply 7 Aug 2018, 14:20
        2
        • B Buckwheat
          3 Aug 2018, 19:37

          Hello @James-Kuyper and Welcome!

          You ask the most common but also the most frustrating to answer question. It is akin to... "For what purpose do I exist?"

          But seriously, I tend to avoid M$ compilers and use MSYS2 as my development platform. This gives me the best and most up-to-date compiler to target both i686 and x86_64 based platforms. This also keeps me constrained from M$isms that keep me from being able to target linux, MacOS, etc.

          From the information you have given, I would say that you installed Qt for M$VC2017 and you actually have M$VC2015 compiler. Try reinstalling Qt but install MSVC2015.

          If you like developing under linux and choose to try MSYS2, I have install topics available.

          Enjoy!

          J Offline
          J Offline
          James Kuyper
          wrote on 7 Aug 2018, 13:42 last edited by
          #4

          @Buckwheat The choice of Microsoft Windows in general, and of MSVC in particular, was made by my employer - I don't get a say in the matter. At home, and at previous jobs, I prefer Linux. And, as I found out after reading your message, my employer deliberately chose MSVC2015 rather than MSVC2017. It was easy to fix, once I realized that it was just a matter of choosing a version of Qt that was compatible with MSVC215.

          1 Reply Last reply
          0
          • J JKSH
            4 Aug 2018, 09:41

            First, try "Qt 5.11.1 MSVC2017 64bit" with the amd64 compiler and ignore the compatibility warning.

            Are you able to build and run an example app?

            @James-Kuyper said in How can I select a compiler version that's compatible with my Qt version?:

            Qt 5.11.1 MSVC2017 64bit

            This is for traditional desktop applications.

            Qt 5.11.1 for UWP 64bit (MSVC 2017)

            This is for Universal Windows Platform apps (the Windows 10 version of "Metro" apps).

            Under the Compilers tab, I see 6 compilers
            Microsoft Visual C++ Compiler 14.0 (xxx), where xxx is any one of the following:

            This is MSVC 2015. In theory, it is fully compatible with MSVC 2017.

            x86, amd64_x86, amd64, x86_amd64, x86_arm, amd64_arm

            Since you downloaded 64-bit Qt, then you want to use the 64-bit compiler (amd64).

            x86 is 32-bit.

            _arm refers to a cross-compiler for ARM CPUs (which are found in mobile phones and embedded devices like Raspberry Pi).

            When I select x86, a mouseover of the kit shows a yellow window saying that the compiler and Qt have different ABIs.

            That's expected, because you cannot mix 32-bit and 64-bit binaries.

            When I select any of the other compiler options, the yellow window always says "The compiler (compiler name) may not produce code compatible with Qt version (Qt version name)".

            Qt Creator does not realize that MSVC 2015 is compatible with MSVC 2017, so ignore the warning for now and see if it works.

            If it doesn't work, you could try upgrading your compiler to MSVC 2017, rebooting, then trying again.

            If that still doesn't work, follow @Buckwheat's suggestion and install the MinGW 5.3.0 compiler (through the Qt Maintenance Tool). You will also need to uninstall "Qt 5.11.1 MSVC2017" and install Qt 5.11.1 MinGW 5.3.0 instead.

            J Offline
            J Offline
            James Kuyper
            wrote on 7 Aug 2018, 14:20 last edited by
            #5

            @JKSH After downgrading to a version of Qt that feels comfortable working with MSVC2015, I had no trouble building the Hello GL2 Example.

            P 1 Reply Last reply 7 Aug 2018, 14:25
            0
            • J James Kuyper
              7 Aug 2018, 14:20

              @JKSH After downgrading to a version of Qt that feels comfortable working with MSVC2015, I had no trouble building the Hello GL2 Example.

              P Offline
              P Offline
              Pablo J. Rogina
              wrote on 7 Aug 2018, 14:25 last edited by
              #6

              @James-Kuyper it seems your issue is solved, great. If so, please don't forget to mark your post as such. Thanks.

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0

              6/6

              7 Aug 2018, 14:25

              • Login

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