Recent

Author Topic: [SOLVED] Cross Compiling from Windows to Linux  (Read 4838 times)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
[SOLVED] Cross Compiling from Windows to Linux
« on: November 04, 2016, 10:30:27 pm »
Hi, I have FPC + Lazarus trunk, it is Lazarus 32 bit. I've installed it whith FPCUPDeluxe.
http://forum.lazarus-ide.org/index.php/topic,34645.0.html

Then today I've installed Cross Compiler for Linux 32 bit with FPCUPDeluxe 0.99 It compiles but gives an error while linking in the .lpr.

Quote
project1.lpr(20,1) Error: Error while linking

This is an empty GUI project, the one that's available when Lazarus starts or when I choose Project > New project.
« Last Edit: November 04, 2016, 10:39:50 pm by lainz »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Cross Compiling from Windows to Linux
« Reply #1 on: November 04, 2016, 10:36:26 pm »
Have a look here :

http://synopse.info/forum/viewtopic.php?id=3620
http://bugs.freepascal.org/view.php?id=30112

Code: Pascal  [Select][+][-]
  1. {$ifdef Linux}
  2.   {$ifdef FPC_CROSSCOMPILING}
  3.     {$ifdef CPUARM}
  4.       //if GUI, then uncomment
  5.       //{$linklib GLESv2}
  6.     {$endif}
  7.     {$linklib libc_nonshared.a}
  8.   {$endif}
  9. {$endif}
« Last Edit: November 04, 2016, 10:38:24 pm by DonAlfredo »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Cross Compiling from Windows to Linux
« Reply #2 on: November 04, 2016, 10:39:38 pm »
Many thanks for your quick response. Is working well. This goes to favorites of course!

Thanks for your incredible tool, I never imagined to cross compile, always seems a difficult task, but now is really easy!

 

TinyPortal © 2005-2018