- This topic has 2 replies, 2 voices, and was last updated 4 years, 10 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
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.
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;
Hi,
Thank you for your bugreport.
It will be fixed in a minor update shortly.
/Kim