Delphi Error – E2121 Procedure or function name expected

Delphi Compiler Error

E2121 Procedure or function name expected

Reason for the Error & Solution

You have specified an identifier which does not represent a procedure or function in an EXPORTS clause.

library Produce;

  var
   y : procedure;

exports y;
begin
end.

It is not possible to export variables from a built-in library, even though the variable is of ‘procedure’ type.

program Solve;

  procedure ExportMe;
  begin
  end;

exports ExportMe;
begin
end.

Always be sure that all the identifiers listed in an EXPORTS clause truly represent procedures.

Share:

Leave A Reply

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

You May Also Like

Delphi Compiler Error E2313 Attribute – Known attribute cannot specify properties Reason for the Error & Solution No further information...
Delphi Compiler Error E2379 Virtual methods not allowed in record types Reason for the Error & Solution No further information...
Rodrigo , one of the long time Delphi Developer has been working on one of his personal project “Delphi IDE...