[Lazarus] Cross-compiling for Raspberry Pi2

Bo Berglund bo.berglund at gmail.com
Thu Sep 24 05:24:06 CEST 2015

On Wed, 23 Sep 2015 17:48:24 -0400, Bo Berglund
<bo.berglund at gmail.com> wrote:

>I will try this.

I checked out the Indy10 version from our own version control into a
new CMP folder for FPC.
Then added the Core, Protocols and System subfolders to the project
search path after creating a new Console project.

I added code into the DoRun procedure of the new project so it looks
like this:
procedure TSSCommTest.DoRun;
  FComm: TIdTCPClient;
  T1, T2: Cardinal;
  { add your program here }
  Writeln('Creating TCP client');
  FComm := TIdTCPClient.Create;
    Writeln('Connecting to on port 2401 (CVS)');
    T1 := GetTickCount;
    FComm.Connect('', 2401);
    T2 := GetTickCount;
    T2 := T2 - T1;
    Writeln('Connection succeeded in ' + IntToStr(T2) + ' ms, now
closing down');
    if FComm.Connected then
  // stop program loop
  Writeln('End of run');
It compiled fine after I added Windows (for GetTickCount) and
IdTCPClient to the uses clause.

Then I ran it and could see this:

Creating TCP client
Connecting to on port 2401 (CVS)
Connection succeeded in 62 ms, now closing down
End of run

So I say that this is milestone #1 on my way.
Now I have to create a server too and check comm between them.
But that will probably be OK....

Bo Berglund
Developer in Sweden

More information about the Lazarus mailing list