Unsolved The first errors in Qt Creator
-
As a newbie of Qt Creator, I made a new project (HelloWorld) for the first time. I did not add any code but this Qt Creator give error messages like that.
:-1: warning: "/usr/bin/clang++" is used by qmake, but "/home/xxx/Qt5.12.2/Tools/QtCreator/libexec/qtcreator/clang/bin/clang" is configured in the kit. Please update your kit (Desktop Qt 5.12.2 GCC 64bit) or choose a mkspec for qmake that matches your target environment better. /home/xxx/Projects/QT/HelloWorld/main.cpp:7: error: use of undeclared identifier 'a' /home/xxx/Projects/QT/HelloWorld/main.cpp:3: warning: unused parameter 'argc' /home/xxx/Projects/QT/HelloWorld/main.cpp:3: warning: unused parameter 'argv'
Could you give me any help to solve this problems. Thank you in advance.
-
@PJS_ Are you on MacOS?
-
@jsulm
Ubuntu 18.04.5 LTS (Bionic Beaver)
Qt Creator 4.8.2 -
@PJS_ Then your Kit is configured wrongly.
On Linux GCC is used as compiler, not clang.
Please follow first https://doc.qt.io/qt-5/linux.html - install needed dependencies and then check the Kit (make sure gcc/g++ are set as C/C++ compiler).