HomeDelphiDelphi Error – E2203 $WEAKPACKAGEUNIT ‘%s’ contains global data

Delphi Error – E2203 $WEAKPACKAGEUNIT ‘%s’ contains global data

Delphi Compiler Error

E2203 $WEAKPACKAGEUNIT ‘%s’ contains global data

Reason for the Error & Solution

A unit which was marked with $WEAKPACKAGEUNIT is being placed into a package, but it contains global data. It is not legal for such a unit to contain global data or initialization or finalization code.

The only solutions to this problem are to remove the $WEAKPACKAGEUNIT mark, or remove the global data from the unit before it is put into the package.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...