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

  • Pages

  • All categories

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

    Join 1,842 other followers

Delphi Error: E1026 File not found: ‘Controls.res’ – Google Search

Posted by jpluimers on 2017/08/10

As since E1026 is [WayBackdocumented as x1026 since Delphi 2007 probably because it can manifest itself as W1026 as well, I thought Delphi Error: E1026 File not found: 'Controls.res' also be related to F1026: When the Delphi XE5 commandline compiler fails with error F1026: File not found: ‘False.dpr’

But it wasn’t.

Then I thought it might have to do with Unit Scope names.

Often an upgrade of a pre-XE2 project where old names of units (like Controls [no WayBack]) were used in stead of Unit Scoped [WayBack] prefixed units (like Vcl.Controls [WayBack]) wrongly makes the Unit Scope Names list in Project > Options > Delphi Compiler empty.

Such an empty list causes the normal mapping of unit name to scoped unit name as described in Unit Names Alphabetical List with Unit Scopes [WayBack] to fail. That results in a F2613 Unit ‘%s’ not found [WayBack] or rarely a F1027 Unit not found ‘%s’ or binary equivalents (%s) (Delphi) [WayBack].

So that wasn’t the cause either.

What happened is was my machine had a PLATFORM environment variable (not having a value like AnyCPU that some others have [WayBack]). It looks like when that environment is present it is not being overwritten by the compiler with the actual value derived from the project platform settings like android, iosDevice32, iosDevice64, iossimulator, osx32, win32, win32c, win64.

The solution is either of these:

  • Search in both the user environment variables and machine environment variables for the PLATFORM variable and remove it.
  • Before starting Delphi, clear the PLATFORM environment variable.

There is an unrelated coincidence with my problem and Unit Scopes were introduced in Delphi XE2 [no WayBack]: it’s the earliest version people ran into this error often but it has nothing to do with the cause.

–jeroen

Source: Delphi Error: E1026 File not found: ‘Controls.res’ – Google Search

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: