[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:
[code]
procedure TSSCommTest.DoRun;
var
FComm: TIdTCPClient;
T1, T2: Cardinal;
begin
{ add your program here }
Writeln('Creating TCP client');
FComm := TIdTCPClient.Create;
try
Writeln('Connecting to 10.0.0.7 on port 2401 (CVS)');
T1 := GetTickCount;
FComm.Connect('10.0.0.7', 2401);
T2 := GetTickCount;
T2 := T2 - T1;
Writeln('Connection succeeded in ' + IntToStr(T2) + ' ms, now
closing down');
finally
if FComm.Connected then
FComm.Disconnect;
FComm.Free;
end;
// stop program loop
Writeln('End of run');
Terminate;
end;
[/code]
It compiled fine after I added Windows (for GetTickCount) and
IdTCPClient to the uses clause.
Then I ran it and could see this:
D:\Engineering\Projects\Lazarus\TCPIPTST>SSTCPTest.exe
Creating TCP client
Connecting to 10.0.0.7 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