* * *

Author Topic: How to Lazarus Cross Compile Win32 to Linux ?  (Read 4303 times)

R0b0t1

  • Full Member
  • ***
  • Posts: 171
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #15 on: November 27, 2017, 07:48:18 am »
I am ok with your opinion, but just out of curiosity: what is odd about it ?
It is a program purpose built to compile FPC, instead of a build configuration for a dedicated piece of software that does the same thing. Eventually languages get their own build system and/or package manager. Perhaps that time has passed, and Fpcupdeluxe is necessary or at least the best solution. Experience has shown me these solutions are inflexible, but Fpcupdeluxe has been around for some time. Perhaps I shouldn't worry.

My comment wasn't about the quality of the code in Fpcupdeluxe.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 875
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #16 on: November 27, 2017, 08:12:09 am »
Thanks for explaining !

My advice will always be to follow the official install instruction for FPC and Lazarus.

Fpcupdeluxe is just one of many tools that can help installing FPC and Lazarus.
It can be useful in situations where a standard install fails. Of for something special like cross-compiling.
Most programming efforts has been put into sandboxing an install by fpcupdeluxe and into the [sometimes dark] secrets of cross-compiling and the building of cross-tools.

So, fpcupdeluxe is neither necessary nor the best. But its the best fit in certain situations.

avra

  • Hero Member
  • *****
  • Posts: 1291
    • Additional info
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #17 on: November 27, 2017, 08:29:06 am »
Fpcupdeluxe is just one of many tools that can help installing FPC and Lazarus. It can be useful in situations where a standard install fails. Of for something special like cross-compiling.
+1 for easy cross compilation. I would also mention that it is very usefull to have many FPC/LAZ versions which do not interfere with official ones. I also like when everything is kept in a single directory, so I can easily copy it between computers (it works as long as dir path stays the same - otherwise shortcut needs adjustment).
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

Schrodinger Kater

  • Newbie
  • Posts: 3
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #18 on: May 10, 2018, 08:43:23 pm »
In fact, everything is very simple (example with FPC 3.0.4):
1) Download fpc-3.0.4.i386-linux.tar/download and unpack it.
2) Among the unpacked folders, find "fpmkinst" and "units" (will be here: {unpacked}\lib\fpc\3.0.4).
3) Copy them to Lazurus, to the folder "Lazarus\fpc\3.0.4".
4) Download binutils-2.15-win32-i386-linux.zip and unzip.
5) Copy the "bin" folder to Lazarus, to the "Lazarus\fpc\3.0.4" folder.
That's all, now in the project parameters it remains to specify "Terget OS: Linux" and "Target CPU: i386".
This scheme allows you to organize any cross-platform compilation, if only there were libraries for the platform (units) and the corresponding cross-compiler (bin).
« Last Edit: May 12, 2018, 08:03:50 pm by Schrodinger Kater »

Thaddy

  • Hero Member
  • *****
  • Posts: 5968
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #19 on: May 10, 2018, 09:35:26 pm »
Yes you are alive and dead at the same time...
Point is that does not always work, fpcdeluxe is the next best thing although I only use it once every release (not even that, but it is good).
« Last Edit: May 10, 2018, 09:37:40 pm by Thaddy »
recommends {$macro on}{$define Silly:=ObjFpc}

Schrodinger Kater

  • Newbie
  • Posts: 3
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #20 on: May 10, 2018, 11:03:00 pm »
you are alive and dead at the same time
Oh, yes, this is my invisible essence. :D

The example above will allow novice users to easily navigate in the necessary elements for the IDE, for organizing cross-compilation in general. For specific situations, in any case, an understanding of the principle of work and experience is required.

rick2691

  • Sr. Member
  • ****
  • Posts: 345
« Last Edit: May 12, 2018, 03:13:35 pm by rick2691 »
Windows 10, LAZ 1.6.4, FPC 3.0.2, SVN 54278, i386-win32-win32/win64, forms use windows unit

Schrodinger Kater

  • Newbie
  • Posts: 3
Re: How to Lazarus Cross Compile Win32 to Linux ?
« Reply #22 on: May 12, 2018, 08:05:32 pm »
@rick2691
I guess, you are right. The old link is a redirect and is left for compatibility. Fix the way in the first post, thanks. :D

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus