1

I managed to solve several issues and install the "GMLib_DXE4.bpl".

Now I have two problems with compiling "GMLib_DXE4_VCL.bpl".

[dcc32 Error] GMMapVCL.pas(124): E2003 Undeclared identifier: 'TTimer'

[dcc32 Error] WebControlVCL.pas(180): E2029 Identifier expected but 'IMPLEMENTATION' found : Solved.

Regarding 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;

Regarding implementation: Solved.

    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;
Vladds7
  • 81
  • 15
  • 1
    When WEBBROWSER and CHROMIUM are not defined, you get an empty type section followed by the keyword implementation, hence the second error message. You better include the type keyword inside both $IFDEF's. – Toon Krijthe Feb 05 '14 at 12:29
  • 1
    though Toon Krijthe are right, GMLib needs at least one browser to run. If you don't define any, GMLib can't work (at this moment only work with TWebBrowser). You have a XE5 version into the SNV repository – cadetill Feb 05 '14 at 13:56
  • Thank you Cadetill. As usual, it worked. Shall I remove the subject ? – Vladds7 Feb 05 '14 at 14:42
  • Don't worry, isn't necessary Vladds ;-) – cadetill Feb 05 '14 at 19:45

1 Answers1

1

You are using an out of date version of GMLib. As a general rule, never download the pre-packaged version of an open source project. Developers have a habit of not updating these pre-packaged downloads as frequently as you might like.

Instead, always go to the revision control repository to get the latest version. In this case it is here: https://code.google.com/p/gmlibrary/source and does appear to have been updated to support XE5.

FWIW your problem could almost certainly have been solved by way of a simple modification to the include file gmlib.inc. That file needs to be made aware of the new version. Take a look at the diffs for the latest revision for that file: https://code.google.com/p/gmlibrary/source/diff?spec=svn142&r=127&format=side&path=/trunk/gmlib.inc&old_path=/trunk/gmlib.inc&old=116

As you can see, all that is needed is to follow the pattern established for the other versions and add defines for XE5.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490