Context: I recently switched from debian stable to debian testing so I have updated several hundred packages since the last time I used QT creator.
When I create a new project in QT creator I am greeted with many error messages.
For example, here are the errors for the autogenerated main.cpp class in a fresh project:
cstddef:50:10: fatal error: 'stddef.h' file not found
error: variable has incomplete type 'QApplication'
forward declaration of 'QApplication'
unknown type name 'MainWindow'
When I open up previous projects that I know have no errors they also show a whole bunch of similar errors.
However, all of these projects build and run just fine.
What is causing this?
2
Answers
I found the solution to this problem in this bug report.
The
libclang-common-8-dev
package needs to be installed. After installing this package and restarting qt creator all of the errors went away.After seeing JShorthouse’s answer, I disabled all the Clang related plugins. Then, everything started working like normal after restarting QT creator.
Find the plugins list in the menu under Help->About Plugins…