The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,776 other followers

Delphi include files and the search strategy are different for the compiler and IDE

Posted by jpluimers on 2016/07/12

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-Enter on 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

2 Responses to “Delphi include files and the search strategy are different for the compiler and IDE”

  1. lextm said

    Microsoft uses several years to resolve such inconsistency by developing Roslyn to power both the compiler and the IDE. I doubt Delphi has enough resource to do the same.

  2. David Moorhouse said

    If it behaves like a bug then …

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: