大
大花鸡
Unregistered / Unconfirmed
GUEST, unregistred user!
我定义一个接口
type
IMyInterface = interface
procedure AA;
end;
实现类:
TTest = class(TObject, IMyInterface)
public
constructor create;
destructor destroy;
procedure AA;
end;
可是编译不了,报错
“[Error] Unit1.pas(19): Undeclared identifier: 'QueryInterface'”
“[Error] Unit1.pas(19): Undeclared identifier: '_AddRef'”
“[Error] Unit1.pas(19): Undeclared identifier: '_Release'”
这是为什么?TObject不能直接与接口联接吗?
type
IMyInterface = interface
procedure AA;
end;
实现类:
TTest = class(TObject, IMyInterface)
public
constructor create;
destructor destroy;
procedure AA;
end;
可是编译不了,报错
“[Error] Unit1.pas(19): Undeclared identifier: 'QueryInterface'”
“[Error] Unit1.pas(19): Undeclared identifier: '_AddRef'”
“[Error] Unit1.pas(19): Undeclared identifier: '_Release'”
这是为什么?TObject不能直接与接口联接吗?