源程序为
unit UnitElement;interface
 uses Classes,Graphics, Controls,Printers,Windows;type
 TElement=class(TGraphicControl)
protected
 //定义元件图形属性
 m_Name:string;//图形对应的电气元件的名称
 m_X1,m_Y1,mX2,m_Y2:Integer;//相对坐标
 m_RealX1,m_RealY1,m_RealX2,m_RealY2:integer;//绝对坐标
 m_RecWidth:integer;//元件图形所在正方形框的边长public
 //得到元件图形属性和给元件图形属性赋值的函数
 function GetRectEx():TRect;//得到元件坐标属的函数
 function SetRectEx(x1,y1,x2,y2:Integer):TRect; //给元件坐标属性赋值的函数
 //构造和析构函数
 constructor Create(AOwner: TComponent); override; destructor Destroy;override;
 //几个比较重要的仅在此出声明而需要在派生类中重载的虚函数
 function DrawEx():boolean;virtual;//绘制元件图形
 function SelectEx():boolean;virtual;//选择元件图形
 procedure MoveToEx(x1,y1:integer);virtual;//移动元件图形
 function DeleteEx():boolean;virtual;//删除元件图形
 function CopyEx():boolean;virtual;//复制元件图形
 function SaveEx(fileName:string):boolean;virtual;//保存元件图形
 function LoadEx(fileName:string):boolean;virtual;//装载元件图形
 function ClearElement():boolean;virtual;//从屏幕上擦除元件图形
 function ReSizeEx(x1,y1,x2,y2:integer):boolean;virtual;//变化元件图形大小
 end;
 implementationend.错误信息为
[Error] UnitElement.pas(17): Unsatisfied forward or external declaration: 'TElement.GetRectEx'
[Error] UnitElement.pas(18): Unsatisfied forward or external declaration: 'TElement.SetRectEx'
[Error] UnitElement.pas(20): Unsatisfied forward or external declaration: 'TElement.Create'
[Error] UnitElement.pas(22): Unsatisfied forward or external declaration: 'TElement.Destroy'
[Error] UnitElement.pas(24): Unsatisfied forward or external declaration: 'TElement.DrawEx'
[Error] UnitElement.pas(25): Unsatisfied forward or external declaration: 'TElement.SelectEx'
[Error] UnitElement.pas(26): Unsatisfied forward or external declaration: 'TElement.MoveToEx'
[Error] UnitElement.pas(27): Unsatisfied forward or external declaration: 'TElement.DeleteEx'
[Error] UnitElement.pas(28): Unsatisfied forward or external declaration: 'TElement.CopyEx'
[Error] UnitElement.pas(29): Unsatisfied forward or external declaration: 'TElement.SaveEx'
[Error] UnitElement.pas(30): Unsatisfied forward or external declaration: 'TElement.LoadEx'
[Error] UnitElement.pas(31): Unsatisfied forward or external declaration: 'TElement.ClearElement'
[Error] UnitElement.pas(32): Unsatisfied forward or external declaration: 'TElement.ReSizeEx'
[Fatal Error] Unit1.pas(7): Could not compile used unit 'UnitElement.pas'