我设法解决了几个问题,并安装了"GMLib_DXE4.bpl“。
现在,我在编译"GMLib_DXE4_VCL.bpl“时遇到了两个问题。
dcc32 Error GMMapVCL.pas(124):E2003未声明标识符:“TTimer”
dcc32 Error WebControlVCL.pas(180):预期的E2029标识符,但“实现”找到:解决。
关于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;发布于 2014-02-05 15:23:49
您使用的是过时版本的GMLib。一般情况下,不要下载开源项目的预打包版本。开发人员有一个习惯,不更新这些预先打包下载的频率,你可能喜欢。
相反,请始终转到修订控制存储库以获得最新版本。在本例中,它在这里:https://code.google.com/p/gmlibrary/source和确实似乎已经更新以支持XE5。
FWIW您的问题几乎可以通过简单的修改包含文件gmlib.inc来解决。需要让该文件知道新版本。查看该文件最新版本的差异:path=/trunk/gmlib.inc&old=116
如您所见,所需要的只是遵循为其他版本建立的模式,并为XE5添加定义。
https://stackoverflow.com/questions/21577248
复制相似问题