The Delphi compiler has a hard time coping with circular unit references
Posted by jpluimers on 2019/06/27
In [WayBack] Anyone here with an “F2092 Program or unit ‘?’ recursively uses itself” error in Tokyo? I have this error in Tokyo but the same project compiles ok in Berlin… – Luis Madaleno – Google+, I commented this:
Large circular reference cycles can trip the compiler into emitting this error (next to out-of-memory errors, access violations and internal errors and “unitX.pas F2063 Could not compile used unit ‘unitY.pas'”).
Solution that usually works: quit Delphi, delete .DCU files, start Delphi, build all, then compile. Cumbersome, time consuming, but since the error is intermittent and involves large code bases, it’s was hard to get it to R&D back in the days.
–jeroen






Leave a comment