Unsolved error in build first simple qwidget app (qt 5.7 , OSX Mountain lion)
-
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: posixerror:
/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) {} -
Hi and welcome to devnet,
Are you using a default project from Qt Creator ?
-
yes
start new project from file menu
and select empty widget
then try run it
I use qt from about 5 years ago -
Something's not clear here, which exact version of Qt are you using ? And Qt Creator ?
-
Adding the following line to the .pro file worked for me:
CONFIG -= c++11Regards, Matt
-
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) -
Hello,
Did you find the solution to that problem? I am new in this and I have the same error.
-
Hi and welcome to devnet,
What version of macOS ? Of Qt ? Of Xcode ?