[Lazarus] Cross-compiling for Raspberry Pi2

Bo Berglund bo.berglund at gmail.com
Thu Sep 24 14:27:44 CEST 2015


On Thu, 24 Sep 2015 08:04:26 +0200, Sven Barth
<pascaldragon at googlemail.com> wrote:

>
>Since you plan to port to Linux a word of caution: the "Windows" unit
>doesn't exist there (and "GetTickCount" does neither), so you either need
>to use platform specific functionality from the "BaseUnix" unit or cross
>platform one from "SysUtils" and friends.

I know...
I only added the GetTickCount in order to get something to display
with connection timing info. The test server is across a VPN channel
into the company network about 1500 miles away. So 62 ms is
acceptable.
 
>You should maybe also take a look into using conditional compilation using
>"$ifdef" and the defines the compiler already provides for you (e.g.
>"windows", "linux", "unix", "cpui386", "cpuarm", etc.).

Right you are!
BTW is there a define for FPC itself too so I can differentiate
between Delphi and FPC? THat way I could possibly use the exact same
sources and not have to make a copy.
Maybe there is a complete list of the defines in FPC?

>Note: in 3.0.0 TThread provides the cross platform class functions
>TThread.GetTickCount and TThread.GetTickCount64.

Is FPC 3.0 stable yet and does it exist on ARM?


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list