strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...
-
Hello to all,
I am cross compiling for an embedded development board and I have some strange issues with qt creator. qtbase was compiled successfully for the target board.
When I create a new project choosing the board that I want to build for, either a simple Console application or a QWidget application, from the first time that I configure the project, some issues appear in qt 'Issues' tab. Those issues concern the main types of like qt.
For console
main.cpp:7: error: unknown type name 'QCoreApplication'
For QWidget
main.cpp:6: error: variable has incomplete type 'QApplication'
qwindowdefs.h:81: forward declaration of 'QApplication'
main.cpp:7: error: unknown type name 'MainWindow'The most strange thing is that the console program compiles and runs successfully remotely on the board, which gives me the indication that
Does anybody has any experience which any similar issue?
Thank you in advance
aplastiras -
Hi @aplastiras,
these errors come from Creators Clang Code Model and are false positives. Such errors exists when Clang cannot parse a header file (for variouse reasons). I have them too on my ARM cross toolchain, but I didn't have the time to fully investigate the problem so far.
You can either try that, or simply disable Clang in Help > About Plugins > Clang Code Model to fall back to the Classic Code Model.
Regards
-
Thanks for your instant response
After that every error disappeared.
This solved the issues... thank you very much indeed.
-
@aplastiras Ok, then please mark this topic as SOLVED too. Thanks!
-
Hi,
@aplastiras said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:
@aha_1980 as I have no experience, I can say that I did mark the topic as SOLVED but it didn't
now the selection MARK AS SOLVED does not exist any more.
It's in the "Topic Tools" button.
-
@SGaist said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:
Hi,
@aplastiras said in strange 'variable has incomplete type' and 'forward declaration of 'QApplication' ' issues ...:
@aha_1980 as I have no experience, I can say that I did mark the topic as SOLVED but it didn't
now the selection MARK AS SOLVED does not exist any more.
It's in the "Topic Tools" button.
done... thank you