Project ERROR: Cannot run compiler 'clang++'. Output
-
Then you should check your Kit.
How did you install Qt ?
-
@jarelsanders1986 Is there a reason why you're using RC1 of the QtCreator?
Do you need Clang? If not you can use GCC which is default on Linux. -
I had the exact the same project parsing error on Qt 5.12.3 and Kubuntu 18.04.2 LTS and solved it an easier way (since in the OP's case, he wouldn't need sudo rights for the symlink):
$ cd /home/jarel/Qt/5.12.1/Tools/QtCreator/libexec/qtcreator/clang/bin
$ ln -sf clang-7 clang++ -
From reading about the latest clang changes in QtCreator, see comments section at:
https://blog.qt.io/blog/2019/04/15/qt-creator-4-9-0-released/it's presumed the preferred Qt method is to use their integrated Clang version with QtCreator, rather than using a mismatched system version with QtCreator's Clang plugins. It's also presumed that QtCreator 4.9.0 should compile C++ code out-of-the-box on Ubuntu with only the system build-essential installed (which only includes the GCC toolchain).
Can you provide any Qt documentation to support this not being a solution or the Qt preferred way?
-
Qt Creator is an IDE, it doesn't provide compiler support. Providing compilers is the role of your OS.
The fact that the clang executable can be found in Qt Creator is an implementation detail because Qt Creator uses clang infrastructure for some of it plugins.
Do not presume things like that. If there was any recommendation to use the clang version Qt Creator uses internally, that would be documented.
-
HI, I have solved the same problem in Ubuntu 18 just by installing qt creator from the repository. In my case it was:
sudo apt-get install qtcreator
This will install all necessary package by itself and then you can run your currently installed version, as this command, unfortunately, doesn't show docs and examples (in my case).
-
@jarelsanders1986 Hello, I was having the same problem. What I did was open the package manager and look for c compiler packages. My standard version is clang11 and clang-cpp-11, I downloaded the following versions: clang13, clang14, along with the documentation. After the update, I opened my project and decided to build it... IT WORKED. QT Creator automatically recognized new compilers. So far I haven't found any problems. Hope my experience helped.
![alt text]( image url)
-