[Lazarus] Cross-compile on Windows for Linux Raspbian (Raspberry Pi) - what are the requirements?

Bo Berglund bo.berglund at gmail.com
Sun Nov 24 10:08:09 CET 2019


I have tried to develop my RPi4 application on the RPi4 itself but
have problems with Lazarus IDE crashing suddenly and inexplicably when
just using the IDE, losing all unsaved changes.

So I have now tried to find a way to develop on Windows 7 (my laptop)
and check build for Raspbian there, but not run. Then transfer sources
to RPi via subversion and build there for testing.

On Windows 7 Pro x64 I have the native Lazarus 2.0.4 and FPC 3.0.4
both of which are 64 bit. Installed via the official sourceforge
installers.
On RPi4 I build the environment entirely from svn sources.


Raspbian on the RPi4 is 32 bit so applications must be built in 32 bit
mode.

I use a few hardware dependent things on RPi4 (GPIO I/O) but I think
these are handled through files etc in Linux so it should not be a
showstopper to at least build on Windows.

Since I never ever created an environment for cross-compiling on
Lazarus I really need a simple to follow byt full description on how
to accomplish the task. Is it even possible for RPi?

I have read somewhere that you cannot really cross-compile from
Windows because of some quirks with floating point support.
I can live with having to use a virtual environment (Linux in a VMWare
virtual machine on Windows) as long as Lazarus does not crash on me
any longer and I can work in the VMWare console.

Currently I work on Lazarus on the RPi4 via VNC....

Any ideas (and links to working how-to pages) welcome!


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list