Lazarus

Programming => Operating Systems => Topic started by: jordicg on February 17, 2020, 10:00:27 pm

Title: Compile project from Linux to Windows with mingw details
Post by: jordicg on February 17, 2020, 10:00:27 pm
Hello comunity!!

Im on Linux and I need to compile my Linux project to Windows i imagine that with mingw, how is this process ? Sorry i couldnt find much info about it
Title: Re: Compile project from Linux to Windows with mingw details
Post by: marcov on February 17, 2020, 10:48:26 pm
Nope, just need a FPC crosscompiler, it has windows linker and assembler (16*,32,64-bit) built in.

* 16-bit only in development versions afaik.
Title: Re: Compile project from Linux to Windows with mingw details
Post by: jordicg on February 27, 2020, 02:21:13 am
Nope, just need a FPC crosscompiler, it has windows linker and assembler (16*,32,64-bit) built in.

* 16-bit only in development versions afaik.

Ok thank you, i have just installed the fpc cross compiler package in arch linux, but i dont know how to configure the fpc for all targets i need, with this i mean in my /usr/lib/fpc/3.3.1/ directory i only have ppcx64 file, nothing for win64 or other platforms as needed so my Lazarus when i change the target in the project options, it complains that fpc is not correctly configured for win64 platform and x86_64 cpu which is what i have choosen as target, hope you can help me with this not much information arround even at Arch Linux forums, thank you in advance.
Title: Re: Compile project from Linux to Windows with mingw details
Post by: marcov on February 27, 2020, 11:45:34 am
FPC compilers are generally per architecture, not per target, so the x86_64 linux compiler (ppcx64) can also compile for win64.

But you need to build the libraries.

Copy relevant units/ tree from a Windows install and putting it in /usr/lib/fpc/3.3.1/units/x86_64-win64 might be the easiest way to get started.

It should be the same 3.3.1 though, since 3.3.1 is a rolling development version
Title: Re: Compile project from Linux to Windows with mingw details
Post by: jordicg on April 26, 2020, 09:11:14 pm
Thank you, in which direcotry i can find those units in a Windows install?  O:-)
Title: Re: Compile project from Linux to Windows with mingw details
Post by: lucamar on April 26, 2020, 09:45:40 pm
Thank you, in which direcotry i can find those units in a Windows install?  O:-)

In, for example, c:\lazarus\fpc\3.3.1\units\x86_64-win64\ or thereabout for a standard Lazarus-Win64 installation.
TinyPortal © 2005-2018