Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Getting this error 'static_assert failed "Error in C++ Standard usage"' in Qt Creator Windows while building C++ application.
QtWS25 Last Chance

Getting this error 'static_assert failed "Error in C++ Standard usage"' in Qt Creator Windows while building C++ application.

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qt6c++ qt6qtcreator debugqmakemsvc2019
4 Posts 4 Posters 1.1k 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.
  • rohit713R Offline
    rohit713R Offline
    rohit713
    wrote on last edited by rohit713
    #1

    Hi Qt Team,

    I am using Qt 6.4.2 in Windows 11 I have also installed MSVC2019 and also MinGW compiler. Both are working fine while I build the project. But while building with MSVC compiler in Qt creator I am getting static_assert failed "Error in C++ Standard usage" (its warning but pretending as an error) although it's not interrupting the build but I am not sure why it's coming, any idea ?

    c71566ba-fb45-4bb2-8114-138153a4c819-image.png

    Axel SpoerlA 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • rohit713R rohit713

      Hi Qt Team,

      I am using Qt 6.4.2 in Windows 11 I have also installed MSVC2019 and also MinGW compiler. Both are working fine while I build the project. But while building with MSVC compiler in Qt creator I am getting static_assert failed "Error in C++ Standard usage" (its warning but pretending as an error) although it's not interrupting the build but I am not sure why it's coming, any idea ?

      c71566ba-fb45-4bb2-8114-138153a4c819-image.png

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @rohit713
      The error has nothing to do with Qt. It comes from Microsoft's C++ Standard Library implementation (STL, https://github.com/microsoft/STL).
      Maybe try a more recent MSVC version.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maz-1
        wrote on last edited by
        #3

        Because QtCreator is shipped with clangd 14, which is not compatible with vs2022, you need clangd 16 instead.
        Goto "C:\Qt\Tools\QtCreator\bin\clang", try to replace with clangd related files from "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64"

        1 Reply Last reply
        0
        • cristian-adamC Offline
          cristian-adamC Offline
          cristian-adam
          wrote on last edited by
          #4

          Qt Creator 13.0.x comes with LLVM 17. Just upgrade to https://download.qt.io/official_releases/qtcreator/13.0/

          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