[Lazarus] Cross-compile console program to Linux (Ubuntu)?
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Oct 23 10:40:33 CEST 2018
On Tue, 23 Oct 2018 08:21:08 +0200
Bo Berglund via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>[...]
> When reading the wiki page
> http://wiki.lazarus.freepascal.org/Cross_compiling#From_Windows_to_Linux
Did you install the binutils?
Did you crossbuild the linux fpc files?
> I understand that the IDE is ready to build for Linux out of the box
> provided it is the same CPU family on the target.
fpc calls for example ppcx64, which can cross compile to other OS for
all x86_64 targets. But you need the cross compiled ppu and o
files for this target, here linux. And for Linux you need the binutils
as well. See the wiki.
> So I changed the target from Default to Linux in
> ProjectOptions/CompilerOptions/ConfigAndTarget/TargetOS
That only works after installing the cross compiled fpc files.
After changing the target OS, when you click Ok of the Project
Options, you should have seen an Error dialog "Compiler
C:\lazarus\....exe does not support target x86_64-linux".
Mattias
More information about the Lazarus
mailing list