Qt 6.11 is out! See what's new in the release
blog
The flag CONFIG += c++14 is not working
-
I would like to compile my program with c++14 but the flag mentioned in the documentation CONFIG += c++14 is not working.
To check that i used byte that exist only from c++17. here is my code:
#include <QCoreApplication> using namespace std; int main(int argc, char *argv[]) { byte a = byte{2}; //QCoreApplication a(argc, argv); printf("sdsdsds"); return 0; }and my .pro file:
QT -= gui QT += core5compat CONFIG += console CONFIG += static CONFIG -= app_bundle CONFIG += c++14 LIBS += -lWindowsApp SOURCES += \ main.cpp qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target -
I would like to compile my program with c++14 but the flag mentioned in the documentation CONFIG += c++14 is not working.
To check that i used byte that exist only from c++17. here is my code:
#include <QCoreApplication> using namespace std; int main(int argc, char *argv[]) { byte a = byte{2}; //QCoreApplication a(argc, argv); printf("sdsdsds"); return 0; }and my .pro file:
QT -= gui QT += core5compat CONFIG += console CONFIG += static CONFIG -= app_bundle CONFIG += c++14 LIBS += -lWindowsApp SOURCES += \ main.cpp qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target -
@KJ92 What Qt version do you use? Could be that Qt6 requires C++17, so it is always active unless you enable a higher C++ version.