HomeDelphiDelphi Error – E2212 Package unit ‘%s’ cannot appear in contains or uses clauses

Delphi Error – E2212 Package unit ‘%s’ cannot appear in contains or uses clauses

Delphi Compiler Error

E2212 Package unit ‘%s’ cannot appear in contains or uses clauses

Reason for the Error & Solution

The unit named in the error is a package unit and as such cannot be included in your project. A possible cause of this error is that somehow a Delphi unit and a package unit have been given the same name. The compiler is finding the package unit on its search path before it can locate a same-named Delphi file. Packages cannot be included in a project by inclusion of the package unit in the uses clause.

Share:

Leave a Reply

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...