我设法解决了几个问题并安装了“GMLib_DXE4.bpl”。
现在我在编译“GMLib_DXE4_VCL.bpl”时遇到了两个问题。
[dcc32 错误] GMMapVCL.pas(124): E2003 未声明的标识符: 'TTimer'
[dcc32 错误] WebControlVCL.pas(180): E2029 Identifier expected but 'IMPLEMENTATION' found : 已解决。
关于 TTimer:
uses
{$IFDEF WEBBROWSER}
SHDocVw,
{$IFDEF DELPHIXE2}
Vcl.ExtCtrls,
{$ELSE}
ExtCtrls,
{$ENDIF}
{$ENDIF}
{$IFDEF CHROMIUM}
cefvcl, ceflib, cefgui,
{$ENDIF}
{$IFDEF DELPHIXE2}
System.SysUtils, System.Classes, Vcl.Dialogs, Vcl.Graphics,
{$ELSE}
SysUtils, Classes, Dialogs, Graphics,
{$ENDIF}
GMMap, GMFunctionsVCL;
关于实施:已解决。
unit WebControlVCL;
{.$DEFINE WEBBROWSER}
{.$DEFINE CHROMIUM}
{$I ..\gmlib.inc}
interface
uses
{$IFDEF WEBBROWSER}
MSHTML, SHDocVw,
{$ENDIF}
{$IFDEF CHROMIUM}
ceflib, cefvcl,
{$ENDIF}
{$IFDEF DELPHIXE2}
System.SysUtils,
{$ELSE}
SysUtils,
{$ENDIF}
WebControl;
type
-------------------------------------------------------------------------------}
{$IFDEF WEBBROWSER}
TWebControl = class(TCustomWeb)
protected
function WebFormGet(const FormNumber: Integer): IHTMLFormElement;
function WebFormFieldValue(const FormIdx: Integer; const FieldName: string): string; overload; override;
public
constructor Create(WebBrowser: TWebBrowser); reintroduce; virtual;
.....
end;
{$ENDIF}
{$IFDEF CHROMIUM}
TWebChromium = class(TCustomWebChromium)
protected
function WebFormFieldValue(const FormIdx: Integer; const FieldName: string): string; overload; override;
public
constructor Create(WebBrowser: TChromium); reintroduce; virtual;
.....
end;
{$ENDIF}
implementation
uses
{$IFDEF WEBBROWSER}
{$IFDEF DELPHIXE2}
Winapi.ActiveX, System.Types, Vcl.Graphics, Vcl.Forms, System.StrUtils,
{$ELSE}
ActiveX, Types, Graphics, Forms, StrUtils,
{$ENDIF}
{$ENDIF}
{$IFDEF DELPHIXE2}
Vcl.Imaging.jpeg, System.DateUtils;
{$ELSE}
jpeg, DateUtils;
{$ENDIF}
{ TWebControl }
{$IFDEF WEBBROWSER}
constructor TWebControl.Create(WebBrowser: TWebBrowser);
begin
inherited Create(WebBrowser);
end;