Jump to content
Lars Fosdal

E2158 System unit out of date or corrupted: missing '@Clr' - how to cure?

Recommended Posts

[dcc32 Fatal Error] One.OfMyUnits.pas(1686): E2158 System unit out of date or corrupted: missing '@Clr'

Clean / Build does not fix it.  And - it happens on our build server too!

 

Have any of you seen this one before?

Share this post


Link to post

Doh! Never mind!

 

I had commented out one of two overloaded methods in the interface section.

There was another "fatal" compilation error further up in the compiler output list.

Basically, it was just a weird IDE/compiler artifact due to invalid code.

 

Share this post


Link to post
On 1/21/2019 at 11:32 AM, Lars Fosdal said:

Doh! Never mind!

 

I had commented out one of two overloaded methods in the interface section.

There was another "fatal" compilation error further up in the compiler output list.

Basically, it was just a weird IDE/compiler artifact due to invalid code.

 

Probably because of the error in the code, the compiler got into an inconsistent state. In such cases, the only way to get rid of the problem is to restart the IDE.

Edited by Rudy Velthuis

Share this post


Link to post

I've found another situation where compiler returning that weird output

 

not working:

  procedure Test1(var ii:array of integer);
  begin
    setlength(ii, 0);
    // (..)
  end;

 

[dcc32 Error] Unit1.pas(100): E2008 Incompatible types
[dcc32 Fatal Error] Unit1.pas(100): E2158 System unit out of date or corrupted: missing '@Clr'


working:


  type iArray=array of integer;
  procedure Test2(var ii:iArray);
  begin
    setlength(ii, 0);
    // (..)
  end;

 

well, never mind, think there are still some issues.

 

edit:

testet with delphi 10.2 - same error

testet with delphi 10.3 update 3 - same error

didn't teste with delphi 10.4.

Edited by mp3freak_en

Share this post


Link to post
Guest

wierd same it's all space to wrote and anybody have a time to identify what IDE/Compiler this occurrs!!! ;(

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×