In case it helps others, I've solved my problem and successfully installed TLazSerial in Lazarus 2.0.10 running under Raspbian OS.
I used Raspbian Preferences | Add / Remove programs to remove the previous 2.0.0 version installed by Rasbian OS by default. I kept the Raspbian installed 3.0.4 version of fpc (Free Pascal Compiler). I then followed the instructions at <https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_Source> to install Lazarus 2.0.10.
I had to use the Update option on a dialog when trying to run Lazarus as it seems Raspbian had not deleted the previous version of Lazarus (This is probably down to me not getting the uninstall correct).
From the Lazarus main menu I used Package | Online Package Manager to install LazSerial. This time, after a successful installation of LazSerial, Lazarus did a successful compile to install LazSerial into the IDE.
Next task is to do a clean install of Raspbian OS and install current versions of fpc, Lazarus and LazSerial to avoid any potentially remaining issues.
MANY THANKS to previous contributors who helped get me here!
Should it be useful to others, here is the code I used to test that I had successfully installed LazSerial. It uses two buttons, a memo component and the all important TLazSerial component to read a device.
+++++++++++++++++++++++++++++++++++++
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LazSerial, Forms, Controls, Graphics, Dialogs, StdCtrls
, LazSynaSer;
type
{ TForm1 }
TForm1 = class(TForm)
btnOpen: TButton;
btnClose: TButton;
LazSerial1: TLazSerial;
Memo1: TMemo;
procedure btnCloseClick(Sender: TObject);
procedure btnOpenClick(Sender: TObject);
procedure LazSerial1RxData(Sender: TObject);
privateremaining
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.btnOpenClick(Sender: TObject);
Begin
LazSerial1.ShowSetupDialog;
LazSerial1.Open;
Memo1.Clear;
end;
procedure TForm1.btnCloseClick(Sender: TObject);
begin
LazSerial1.Close;
Close;
end;
procedure TForm1.LazSerial1RxData(Sender: TObject);
begin
Memo1.lines.Add(LazSerial1.ReadData);
end;
end.