正如所评论的,您的代码不能是真正的代码。
我正在发布这个,我现在用 Delphi XE3 编译没有任何问题。
文件:abc.inc
type
Interace_Info = packed record
iflag: ulong;
end;
文件:Unit2.pas
unit Unit2;
interface
uses winapi.Windows;
{$include abc.inc}
implementation
end.
文件:Unit1.pas
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
type
TLocal = array[0..10] of Interace_Info;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
ALocal: TLocal;
begin
ALocal[0].iflag := 0;
ShowMessage(IntToStr(ALocal[0].iflag));
end;
end.
它编译和运行没有任何问题。