Priority: P2: Important
Affects Version/s: Qt Creator 4.11.0
Fix Version/s: None
Component/s: C/C++/Obj-C++ Support
Environment:Ubuntu 20.04.2 LTS + qtCreator 4.11.0
I identified an interesting problem while working with qtCreator / C++:
When trying to build a C++ application a lot of stray errors occur. Compilation does not stop such that hundreds of stray errors occur. The only way is to kill qtCreator as it will stop to react to input.
I found some posts like this (https://stackoverflow.com/questions/4897661/qtcreator-a-big-lot-of-stray-errors) which mention invalid encodings. However, I was unable to solve the problem and verified that my files have no "hidden characters".
After a lot of trial and error I figured out how to reproduce this error:
Screenshot 01: Create a new plain C++ application.
Screenshot 02: Choose a class which is part of the C++ standard as project name. I tested it with "string", "map" and "set". All of these names belong to C++ classes which are part of std.
Screenshot 03: Compile&Run: Everything works fine
Screenshot 04: If you include the header of the class which you have chosen as your qt project (in my case "set", see line 7) and try to build, you will get stuck in the endless "stray"-error loop.