Recently I bumped into a thing that I’d long forgotten: the Delphi compiler treats searching for include files (any files used with the {$I} or {$include} directive differently:
- The compiler first searches the directory where the file that is including resides and then uses the project and IDE search paths.
- The IDE only uses the project and IDE search paths.
This means that when you press
Ctrl-Enteron the filename to be included you might edit a different file than the compiler will include.
So when a product has multiple include files with the same name in different sub-directories, then you must modify them all.
I’m not sure this is a bug or feature, so Embarcadero is free to put this in either their QA system or documentation system.
–jeroen





