Bookstore

Recent

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

jordicg

  • Newbie
  • Posts: 3
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: 8099
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: 3
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: 8099
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