I have just installed QTCreator in Linux Ubuntu 20.04 LTS, I clicked on File->New Project->Application->QTConsole Application. A first.pro file and main.cpp file was made.
The first.pro contains:
QT -= gui declarative
QT += widgets
CONFIG += c++11 console
CONFIG -= app_bundle
DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += \
main.cpp
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
The main.cpp contains:
#include <QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
The error comes in QCoreApplication line.
The reason is that new versions of Qtcreator on Ubuntu 20.04 install
clang-10, but it still needingclang-8.Install clang-8 package: