Recent

Author Topic: Compile project from Linux to Windows with mingw details  (Read 859 times)

jordicg

  • Newbie
  • Posts: 4
Compile project from Linux to Windows with mingw details
« 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

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8787
  • FPC developer.
Re: Compile project from Linux to Windows with mingw details
« Reply #1 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.

jordicg

  • Newbie
  • Posts: 4
Re: Compile project from Linux to Windows with mingw details
« Reply #2 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.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8787
  • FPC developer.
Re: Compile project from Linux to Windows with mingw details
« Reply #3 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

jordicg

  • Newbie
  • Posts: 4
Re: Compile project from Linux to Windows with mingw details
« Reply #4 on: April 26, 2020, 09:11:14 pm »
Thank you, in which direcotry i can find those units in a Windows install?  O:-)

lucamar

  • Hero Member
  • *****
  • Posts: 3077
Re: Compile project from Linux to Windows with mingw details
« Reply #5 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.
« Last Edit: April 26, 2020, 09:47:52 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018