I'm using C++ builder Rio 10.3.1 with the clang compiler. The compiler has an option to inject a header file before each source file to make sure all files use the same precompiled header. This option can be found in the project options under Building > C++ Compiler > Pre-compiled headers: Inject precompiled header file.
When creating a new project, a header is auto-generated with this content:
Code: Select all
#include <vcl.h>
#include <tchar.h>
When I set this option to the auto-generated header (Project2PCH1.h), I get the following errors while compiling:
Code: Select all
[C++ Error] Project2PCH1.h(1, 12): #include nested too deeply
[C++ Error] Project2PCH1.h(1, 9): #include nested too deeply
[C++ Error] Project2PCH1.h(2, 9): #include nested too deeply
[C++ Error] vcl.h(10, 9): #include nested too deeply
[C++ Error] tchar.h(15, 9): #include nested too deeply
[C++ Error] tchar.h(37, 9): #include nested too deeply
[C++ Error] tchar.h(703, 8): unknown type name '_WINT_T'
This works correctly using the classic compiler, it only gives the errors with the clang compiler. It also compiles fine when TwineCompile is disabled.