warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
18,975
Solution 1
you want QMAKE_CXXFLAGS+=-Wno-c++11-extensions
I suspect.
pertinent part:
-Wfoo
: Enable warningfoo
.
-Wno-foo
: Disable warningfoo
.
Solution 2
According to qmake's repository history, the CONFIG += c++14
stanza was added in qmake version 5.4: https://codereview.qt-project.org/#/c/87831/
However, it seems Debian Jessie only has qmake version 5.3 (https://packages.debian.org/jessie/qt5-qmake)
As a workaround, you can use
QMAKE_CXXFLAGS += -std=c++14
or
QMAKE_CXXFLAGS += -std=gnu++14
Author by
KcFnMi
Updated on June 19, 2022Comments
-
KcFnMi almost 2 years
I'm using Qt5 with Clang on Debian Jessie. To experiment with generic lambdas, in the .pro file there is:
CONFIG += c++14
And after building I got:
warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
To get rid of this obvious message I did:
QMAKE_CXXFLAGS += -Wc++11-extensions
But I keep getting the obvious message. Why? How to hide it?