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. can't run QT6 in visual studio 2022
Qt 6.11 is out! See what's new in the release blog

can't run QT6 in visual studio 2022

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 7 Posters 12.1k Views 2 Watching
  • 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.
  • artwawA artwaw

    @HerrWinfried Have you installed Windows SDK?

    HerrWinfriedH Offline
    HerrWinfriedH Offline
    HerrWinfried
    wrote on last edited by HerrWinfried
    #3

    @artwaw oh yes i downloaded it now. But this time the error has changed.
    353d207f-ef37-457f-90cc-b4c31d3a2688-image.png

    Christian EhrlicherC 1 Reply Last reply
    0
    • HerrWinfriedH HerrWinfried

      @artwaw oh yes i downloaded it now. But this time the error has changed.
      353d207f-ef37-457f-90cc-b4c31d3a2688-image.png

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @HerrWinfried This is the C++ standard you use. This does not answer @artwaw's question if you properly installed the WindowsSDK. The error you're showing us does not come from Qt but from a missing header file provided by MSVC / WindowsSDK - there is nothing Qt can do against this.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #5

        Qt6 requires c++17. Try the following:
        To set this for a project:

        1. Right click a project, go to Properties
        2. Select Configuration Properties > C/C++ > Language
        3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"
        HerrWinfriedH 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          Qt6 requires c++17. Try the following:
          To set this for a project:

          1. Right click a project, go to Properties
          2. Select Configuration Properties > C/C++ > Language
          3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"
          HerrWinfriedH Offline
          HerrWinfriedH Offline
          HerrWinfried
          wrote on last edited by HerrWinfried
          #6

          @Christian-Ehrlicher said in can't run QT6 in visual studio 2022:

          @HerrWinfried This is the C++ standard you use. This does not answer @artwaw's question if you properly installed the WindowsSDK. The error you're showing us does not come from Qt but from a missing header file provided by MSVC / WindowsSDK - there is nothing Qt can do against this.

          Thanks for the info, I'll upload it again and have a look.
          The strange thing is that I can compile via QT Creator. however, an exclamation point appears next to it on the build screen.
          0cd70701-81ef-4fc9-8f1a-6571788643c4-image.png

          @JoeCFD said in can't run QT6 in visual studio 2022:

          Qt6 requires c++17. Try the following:
          To set this for a project:

          1. Right click a project, go to Properties
          2. Select Configuration Properties > C/C++ > Language
          3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"

          I mentioned it in the image above, it's already set like that. Thanks anyway.

          JoeCFDJ jsulmJ KroMignonK 3 Replies Last reply
          0
          • HerrWinfriedH HerrWinfried

            @Christian-Ehrlicher said in can't run QT6 in visual studio 2022:

            @HerrWinfried This is the C++ standard you use. This does not answer @artwaw's question if you properly installed the WindowsSDK. The error you're showing us does not come from Qt but from a missing header file provided by MSVC / WindowsSDK - there is nothing Qt can do against this.

            Thanks for the info, I'll upload it again and have a look.
            The strange thing is that I can compile via QT Creator. however, an exclamation point appears next to it on the build screen.
            0cd70701-81ef-4fc9-8f1a-6571788643c4-image.png

            @JoeCFD said in can't run QT6 in visual studio 2022:

            Qt6 requires c++17. Try the following:
            To set this for a project:

            1. Right click a project, go to Properties
            2. Select Configuration Properties > C/C++ > Language
            3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"

            I mentioned it in the image above, it's already set like that. Thanks anyway.

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #7

            @HerrWinfried It might have been added to your project.
            Check your pro file and you may find
            CONFIG += c++17

            if you use cmake, it may have included
            set(CMAKE_CXX_STANDARD 17)

            But I am surprised that vs 2022 does not have c++17 as default

            1 Reply Last reply
            1
            • HerrWinfriedH HerrWinfried

              @Christian-Ehrlicher said in can't run QT6 in visual studio 2022:

              @HerrWinfried This is the C++ standard you use. This does not answer @artwaw's question if you properly installed the WindowsSDK. The error you're showing us does not come from Qt but from a missing header file provided by MSVC / WindowsSDK - there is nothing Qt can do against this.

              Thanks for the info, I'll upload it again and have a look.
              The strange thing is that I can compile via QT Creator. however, an exclamation point appears next to it on the build screen.
              0cd70701-81ef-4fc9-8f1a-6571788643c4-image.png

              @JoeCFD said in can't run QT6 in visual studio 2022:

              Qt6 requires c++17. Try the following:
              To set this for a project:

              1. Right click a project, go to Properties
              2. Select Configuration Properties > C/C++ > Language
              3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"

              I mentioned it in the image above, it's already set like that. Thanks anyway.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @HerrWinfried said in can't run QT6 in visual studio 2022:

              however, an exclamation point appears next to it on the build screen

              If you put cursor over it: what does it say?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              HerrWinfriedH 1 Reply Last reply
              0
              • HerrWinfriedH HerrWinfried

                @Christian-Ehrlicher said in can't run QT6 in visual studio 2022:

                @HerrWinfried This is the C++ standard you use. This does not answer @artwaw's question if you properly installed the WindowsSDK. The error you're showing us does not come from Qt but from a missing header file provided by MSVC / WindowsSDK - there is nothing Qt can do against this.

                Thanks for the info, I'll upload it again and have a look.
                The strange thing is that I can compile via QT Creator. however, an exclamation point appears next to it on the build screen.
                0cd70701-81ef-4fc9-8f1a-6571788643c4-image.png

                @JoeCFD said in can't run QT6 in visual studio 2022:

                Qt6 requires c++17. Try the following:
                To set this for a project:

                1. Right click a project, go to Properties
                2. Select Configuration Properties > C/C++ > Language
                3. For C++ Language Standard select "ISO C++17 Standard (/std:c++17)"

                I mentioned it in the image above, it's already set like that. Thanks anyway.

                KroMignonK Offline
                KroMignonK Offline
                KroMignon
                wrote on last edited by
                #9

                @HerrWinfried said in can't run QT6 in visual studio 2022:

                I mentioned it in the image above, it's already set like that. Thanks anyway.

                Perhaps, but you select an x86 debugger for a amd64 compiler. I don't thing this is valid configuration.

                It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @HerrWinfried said in can't run QT6 in visual studio 2022:

                  however, an exclamation point appears next to it on the build screen

                  If you put cursor over it: what does it say?

                  HerrWinfriedH Offline
                  HerrWinfriedH Offline
                  HerrWinfried
                  wrote on last edited by
                  #10

                  @jsulm said in can't run QT6 in visual studio 2022:

                  @HerrWinfried said in can't run QT6 in visual studio 2022:

                  however, an exclamation point appears next to it on the build screen

                  If you put cursor over it: what does it say?

                  f2a265c0-f2e5-49f9-9296-892133c86b19-image.png

                  @KroMignon said in can't run QT6 in visual studio 2022:

                  @HerrWinfried said in can't run QT6 in visual studio 2022:

                  I mentioned it in the image above, it's already set like that. Thanks anyway.

                  Perhaps, but you select an x86 debugger for a amd64 compiler. I don't thing this is valid configuration.

                  My result did not change when I did x64

                  jsulmJ 1 Reply Last reply
                  0
                  • HerrWinfriedH HerrWinfried

                    @jsulm said in can't run QT6 in visual studio 2022:

                    @HerrWinfried said in can't run QT6 in visual studio 2022:

                    however, an exclamation point appears next to it on the build screen

                    If you put cursor over it: what does it say?

                    f2a265c0-f2e5-49f9-9296-892133c86b19-image.png

                    @KroMignon said in can't run QT6 in visual studio 2022:

                    @HerrWinfried said in can't run QT6 in visual studio 2022:

                    I mentioned it in the image above, it's already set like that. Thanks anyway.

                    Perhaps, but you select an x86 debugger for a amd64 compiler. I don't thing this is valid configuration.

                    My result did not change when I did x64

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @HerrWinfried I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                    You can ask Qt devs on their mailing list.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    KroMignonK 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @HerrWinfried I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                      You can ask Qt devs on their mailing list.

                      KroMignonK Offline
                      KroMignonK Offline
                      KroMignon
                      wrote on last edited by
                      #12

                      @jsulm said in can't run QT6 in visual studio 2022:

                      I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                      You can ask Qt devs on their mailing list.

                      @HerrWinfried

                      Visual Studio 2022 toolchain support/detection has been added into Qt Creator 6.0 (cf release note: https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-6.0.0.md)
                      First RC has been published at 11.11 (cf. https://www.qt.io/blog/qt-creator-6-rc-released)

                      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                      HerrWinfriedH 1 Reply Last reply
                      1
                      • KroMignonK KroMignon

                        @jsulm said in can't run QT6 in visual studio 2022:

                        I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                        You can ask Qt devs on their mailing list.

                        @HerrWinfried

                        Visual Studio 2022 toolchain support/detection has been added into Qt Creator 6.0 (cf release note: https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-6.0.0.md)
                        First RC has been published at 11.11 (cf. https://www.qt.io/blog/qt-creator-6-rc-released)

                        HerrWinfriedH Offline
                        HerrWinfriedH Offline
                        HerrWinfried
                        wrote on last edited by
                        #13

                        @KroMignon said in can't run QT6 in visual studio 2022:

                        @jsulm said in can't run QT6 in visual studio 2022:

                        I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                        You can ask Qt devs on their mailing list.

                        @HerrWinfried

                        Visual Studio 2022 toolchain support/detection has been added into Qt Creator 6.0 (cf release note: https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-6.0.0.md)
                        First RC has been published at 11.11 (cf. https://www.qt.io/blog/qt-creator-6-rc-released)

                        Sounds like something that won't fix my problem in visual studio 2022. Thanks again for the information.

                        jsulmJ 1 Reply Last reply
                        0
                        • HerrWinfriedH HerrWinfried

                          @KroMignon said in can't run QT6 in visual studio 2022:

                          @jsulm said in can't run QT6 in visual studio 2022:

                          I guess Qt does not yet support C++ compiler from Visual Studio 2022.
                          You can ask Qt devs on their mailing list.

                          @HerrWinfried

                          Visual Studio 2022 toolchain support/detection has been added into Qt Creator 6.0 (cf release note: https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-6.0.0.md)
                          First RC has been published at 11.11 (cf. https://www.qt.io/blog/qt-creator-6-rc-released)

                          Sounds like something that won't fix my problem in visual studio 2022. Thanks again for the information.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          @HerrWinfried According to https://www.qt.io/blog/qt-vs-tools-for-visual-studio-2022 it should work, but I'm not sure about Qt itself.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          HerrWinfriedH 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @HerrWinfried According to https://www.qt.io/blog/qt-vs-tools-for-visual-studio-2022 it should work, but I'm not sure about Qt itself.

                            HerrWinfriedH Offline
                            HerrWinfriedH Offline
                            HerrWinfried
                            wrote on last edited by
                            #15

                            That's the point that confuses me, but anyway, I prefer to wait a few weeks for now.

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              Greg_Phil
                              wrote on last edited by
                              #16

                              @HerrWinfried
                              The problem is that VS2022 doesn't return by default the right value for

                              __cplusplus
                              

                              No idea if that's a bug or a feature in VS2022. However, here the solution how to overcome this issue:
                              https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170

                              cheers
                              Greg

                              1 Reply Last reply
                              3

                              • Login

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