I want to use Synaser with my program for serial communication. So, I downloaded it and linked it to my project.
When I start to compile my project, I got the following syntax error message for the Synaser Library.
Error: Incompatible Type: got "ShortInt" expected "pointer."
This is error is raised within the following procedure, which is from the Synaser Library file. The line that is giving me problem is marked with arrow.
procedure TBlockSerial.Purge;
begin
{$IFNDEF FPC}
SerialCheck(ioctl(integer(FHandle), TCFLSH, TCIOFLUSH)); <<<======
{$ELSE}
SerialCheck(fpioctl(integer(FHandle), TCFLSH, TCIOFLUSH)); <<<=====
{$ENDIF}
FBuffer := '';
ExceptCheck;
end;
Anyone have any idea? Thank you.