kbmMW 5.15.00 cannot compile on android

Home Forums kbmMW kbmMW 5.15.00 cannot compile on android

Viewing 2 reply threads
  • Author
    Posts
    • #55620
      TomYU
      Participant

      hi,kim

      I can’t compile on android platform.

      in kbmMWGlobal unit:

      class function Memory2Int16(const AMemory:PByte; const ALittleEndian:boolean):short; {$IFDEF KBMMW_PLATFORM_INLINE}static; inline;{$ENDIF}

      error message:

      [DCC Error] kbmMWGlobal.pas(1608): E2003 Undeclared identifier: ‘short’

      [DCC Fatal Error] kbmMWGlobal.pas(3643): F2063 Could not compile used unit ‘kbmMWExceptions.pas’

      best regards

      Tom YU.

       

       

    • #55622
      TomYU
      Participant

      fixed code:

      
      class function TkbmMWPlatformMarshal.Memory2Int16(const AMemory:PByte; const ALittleEndian:boolean):smallint;
      type
      TShortBytes = packed record
      case integer of
      1: (short: smallint);
      2: (b:array[1..2] of byte);
      end;
      PShortBytes = ^TShortBytes;
      PShort=^smallint;
      var
      t:TShortBytes;
      begin
      {$IFDEF KBMMW_BIG_ENDIAN}
      if ALittleEndian then
      {$ELSE}
      if not ALittleEndian then
      {$ENDIF}
      begin
      t.b[1]:=PShortBytes(AMemory).b[2];
      t.b[2]:=PShortBytes(AMemory).b[1];
      Result:=t.short;
      end
      else
      Result:=PShort(AMemory)^;
      end;
      
      
    • #55624
      kimbomadsen
      Keymaster

      Hi,

      Thank you for your bugreport.

      It will be fixed in a minor update shortly.

      /Kim

Viewing 2 reply threads
  • You must be logged in to reply to this topic.