QT requires C++17 error
-
wrote on 29 Nov 2022, 19:02 last edited by
Prior to using g 6.5.0 I have added this to my main .pro file ,
and now I am getting this error "QT requires C++17"CONFIG += c++17
I am getting multiples of such errors - QT requires C++17
Do I have to add CONFIG += c++17 to each sub-project .pro file ?
Or what else do I have to do ?
-
wrote on 30 Nov 2022, 07:30 last edited by
Qt 6 qmake enables C++17 by default and Qt 5 did not. Hence, under Qt 5 if you wanted to use C++17 language features in your code you needed to deliberately set this in
CONFIG
. You can still set this in a Qt 6 project file but it will have no impact.Your problem lies elsewhere. Since you do not share your project, compiler, platform, or the exact error message(s) it is difficult to say anything else.
-
Prior to using g 6.5.0 I have added this to my main .pro file ,
and now I am getting this error "QT requires C++17"CONFIG += c++17
I am getting multiples of such errors - QT requires C++17
Do I have to add CONFIG += c++17 to each sub-project .pro file ?
Or what else do I have to do ?
@AnneRanch said in QT requires C++17 error:
Do I have to add CONFIG += c++17 to each sub-project .pro file ?
yes, or create a
.qmake-conf
for your overall project.That conf file is searched by each project file recursively in the parent directories. So place it in the top most folder of your project
1/3