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.