Solved 'CONFIG += c++17' does not take an effect in .pro file.
CONFIG += c++17
in my .pro file, but getting the following compiler errors:
error C4984: 'if constexpr' is a C++17 language extension error C7525: inline variables require at least '/std:c++17'
My QT version 5.13
Compiler: MSVC 2017.
Hi @J.Hilk !
I do not know exactly what 'c++1z' is, but it has the same effect, there are still the same compiler errors. (I deleted the build directory and did a clean build).
@Dmitriano did you make a complete rebuild of your project, clean -> qmake -> make?
Changing the pro file will require a complete recreation
yes I replaced
#CONFIG += c++17 CONFIG += c++1z
removed the build directory and rebuilt the project.
well I#m out of ideas,
according to this reference
it should work, if your compiler supports it.
I would assume, that MSVC2017 does indeed support c++17 😟
@Dmitriano please show your compiler output. Both
c++17should work in Qt 5.12 upwards. For version < 5.12, you need to specify