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. error in build first simple qwidget app (qt 5.7 , OSX Mountain lion)

error in build first simple qwidget app (qt 5.7 , OSX Mountain lion)

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 5 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.
  • P Offline
    P Offline
    polto molto
    wrote on last edited by
    #1

    system :

    • OSX Mountain lion 10.8.5
    • QT 5.6 or 5.7 : the same error

    compiler:

    clang++ -v
    Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin12.5.0
    Thread model: posix

    error:

    /Users/ahbanna/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:162:5: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
    QAtomicInt(int value = 0) Q_DECL_NOTHROW : QAtomicInteger<int>(value) {}
    ^
    /Users/ahbanna/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:162:48: note: non-literal type 'QAtomicInteger<int>' cannot be used in a constant expression
    QAtomicInt(int value = 0) Q_DECL_NOTHROW : QAtomicInteger<int>(value) {}

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you using a default project from Qt Creator ?

      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
      • P Offline
        P Offline
        polto molto
        wrote on last edited by
        #3

        yes
        start new project from file menu
        and select empty widget
        then try run it
        I use qt from about 5 years ago

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Something's not clear here, which exact version of Qt are you using ? And Qt Creator ?

          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
          • M Offline
            M Offline
            matt58
            wrote on last edited by
            #5

            Adding the following line to the .pro file worked for me:
            CONFIG -= c++11

            Regards, Matt

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hugoduar
              wrote on last edited by
              #6

              I've got the same error on Mountain Lion.

              Using:

              Qt Creator 4.1.0
              Based on Qt 5.7.0 (Clang 7.0 (Apple), 64 bit)

              1 Reply Last reply
              0
              • E Offline
                E Offline
                Emilio_AC
                wrote on last edited by
                #7

                Hello,

                Did you find the solution to that problem? I am new in this and I have the same error.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi and welcome to devnet,

                  What version of macOS ? Of Qt ? Of Xcode ?

                  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