Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Installation and Deployment
    3
    5
    712
    Loading More Posts
    • 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
      SAndavan Palani last edited by

      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 Reply Quote 0
      • Christian Ehrlicher
        Christian Ehrlicher Lifetime Qt Champion last edited by

        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 has to stay free or it will die.

        S 1 Reply Last reply Reply Quote 1
        • S
          SAndavan Palani @Christian Ehrlicher last edited by

          @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 Reply Quote 0
          • Christian Ehrlicher
            Christian Ehrlicher Lifetime Qt Champion last edited by

            @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 has to stay free or it will die.

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • First post
                Last post