Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Installed Qt 5.14.2 [ Build failed with C++ 11 ]

Installed Qt 5.14.2 [ Build failed with C++ 11 ]

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 2.1k Views 1 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.
  • S Offline
    S Offline
    SAndavan Palani
    wrote on last edited by
    #1

    I installed Qt 5.15.2 version in RHEL 7.9 and my project .pro file already contains
    CONFIG += c++11
    while building the qml application, getting the below error
    ''
    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:61: error: #error "Qt requires C++11 support"
    In file included from ../../Qt/5.14.2/gcc_64/include/QtCore/qatomic.h:46:0,
    from ../../Qt/5.14.2/gcc_64/include/QtCore/qglobal.h:1302,
    from ../../Qt/5.14.2/gcc_64/include/QtGui/qtguiglobal.h:43,
    from ../../Qt/5.14.2/gcc_64/include/QtGui/qguiapplication.h:43,
    from ../../Qt/5.14.2/gcc_64/include/QtGui/QGuiApplication:1,
    from ../helloworld1/main.cpp:1:
    ../../Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:61:4: error: #error "Qt requires C++11 support"

    error "Qt requires C++11 support"

    ^
    

    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:94: error: ‘QAtomicOps’ does not name a type
    ../../Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:94:13: error: ‘QAtomicOps’ does not name a type
    typedef QAtomicOps<T> Ops;
    ^
    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:94: error: ‘QAtomicOps’ does not name a type
    ../../Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:94:13: error: ‘QAtomicOps’ does not name a type
    typedef QAtomicOps<T> Ops;
    ^
    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:97: error: ‘::IsSupported’ has not been declared
    ../../Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:97:51: error: ‘::IsSupported’ has not been declared
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
    ^
    ../../Qt/5.14.2/gcc_64/include/QtCore/qglobal.h:121:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’

    define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)

                                                                    ^
    

    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qglobal.h:121: error: non-constant condition for static assertion
    ../../Qt/5.14.2/gcc_64/include/QtCore/qglobal.h:121:49: error: non-constant condition for static assertion

    define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)

                                                 ^
    

    ../../Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
    ^
    /home/senthilandavan/Qt/5.14.2/gcc_64/include/QtCore/qbasicatomic.h:97: confused by earlier errors, bailing out
    :-1: error: [main.o] Error 1
    '''
    Please help me

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      As the error message already tells you your compiler does not (properly) support c++11. Upgrade your compiler to at least gcc5.3.1 as documented here: https://doc.qt.io/qt-5.14/supported-platforms.html

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

      S 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        As the error message already tells you your compiler does not (properly) support c++11. Upgrade your compiler to at least gcc5.3.1 as documented here: https://doc.qt.io/qt-5.14/supported-platforms.html

        S Offline
        S Offline
        SAndavan Palani
        wrote on last edited by
        #3

        @Christian-Ehrlicher Thank you. I am trying to install gcc updated version. If possible, could you share me how to download gcc .

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @SAndavan-Palani said in Installed Qt 5.14.2 [ Build failed with C++ 11 ]:

          If possible, could you share me how to download gcc .

          I don't know how you install packages on RHEL.

          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
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Since you are on RedHat, their documentation is your friend. Look for yum.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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