[SOLVED] Lazarus on Linux but Target OS=Win64 and CPU=x86_64 lazarus / 11-Options ---------------------------------------------------------------------- Sakkie · 2025-04-24 08:52 I have been developing apps on Windows 10 and have just switched to Linux (Zorin to be specific). All my apps compile fine and run in the Linux environment but when I change the target OS to Win64 and CPU to x86_64 I get the error: QuoteThe project uses target OS=win64 and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories. I understand the error but I don't know how to fix it. May someone please guide me. I have installed all the packages that are listed as necessary but I can't find how to install fpcupdeluxe itself. What am I missing? ---------------------------------------------------------------------- dbannon · 2025-04-24 11:42 https://wiki.freepascal.org/Cross_compiling_for_Windows_under_Linux Although, if you have been using fpcupdeluxe, no idea if it has done some or all of this. Better check before overwriting. Davo ---------------------------------------------------------------------- Sakkie · 2025-04-24 11:48 Thank you so much Davo. This looks like it's the answer to my question. I will update you later. ---------------------------------------------------------------------- TRon · 2025-04-24 14:05 Quote from: dbannon on April 24, 2025, 01:42:16 pmAlthough, if you have been using fpcupdeluxe, no idea if it has done some or all of this. Better check before overwriting. Depends whether or not you already installed a (cross-)compiler on the first setup. If only used the install button on main window (for FPC or FPC&laz combo) then the answer would be no. The good news is you can install a cross-compiler (tab cross) using the same install path in which case FPCUpdeluxe will update the existing FPC installation with the (selected) cross-compiler. Basically all tha FPCup does is add the ppc cross compiler (when required/missing for the target) and the (cross-)compiled units to the units directory. Oh, and it probably updates the fpc.cfg so that it is able to locate the compiled units. When done, selecting the target (cpu/platform) in Lazarus for a project should be enough though the used components will need to be (cross-)compiled for chosen target as well so that the first build for the project might be a bit slow. Wen not using FPCUpDeluxe things are a bit more complicated depending on how FPC was installed and setup/configured. Without that knowledge all that can be said is to do the same as FPCUpdeluxe does but manually. The wiki describes the manual steps that can be used but the order in which is done where and what to do with the result can be a bit cumbersome to understand for the reader (if you've done it once you'll most probably get/understand it). Always be prepared to ruin your existing setup (so make backups for the important bits in case you care). ---------------------------------------------------------------------- Sakkie · 2025-04-24 19:38 Quote from: dbannon on April 24, 2025, 01:42:16 pmhttps://wiki.freepascal.org/Cross_compiling_for_Windows_under_Linux Although, if you have been using fpcupdeluxe, no idea if it has done some or all of this. Better check before overwriting. Davo Thanks a lot. I have followed the steps as outlined in the article and everything works perfectly. What I would caution anyone who has the same problem I had is that the first time you compile your project the target OS must the default (Linux). Only after this first compilation can you change the target OS. If you start the other way around you might have problems when you continue with the development under Linux as the project breaks. This is what I discovered when I was testing different scenarios. I am not knowledgeable enough to understand why this is. Thanks once again Davo. ---------------------------------------------------------------------- Sakkie · 2025-04-24 19:42 Quote from: TRon on April 24, 2025, 04:05:32 pmQuote from: dbannon on April 24, 2025, 01:42:16 pmAlthough, if you have been using fpcupdeluxe, no idea if it has done some or all of this. Better check before overwriting. Depends whether or not you already installed a (cross-)compiler on the first setup. If only used the install button on main window (for FPC or FPC&laz combo) then the answer would be no. The good news is you can install a cross-compiler (tab cross) using the same install path in which case FPCUpdeluxe will update the existing FPC installation with the (selected) cross-compiler. Basically all tha FPCup does is add the ppc cross compiler (when required/missing for the target) and the (cross-)compiled units to the units directory. Oh, and it probably updates the fpc.cfg so that it is able to locate the compiled units. When done, selecting the target (cpu/platform) in Lazarus for a project should be enough though the used components will need to be (cross-)compiled for chosen target as well so that the first build for the project might be a bit slow. Wen not using FPCUpDeluxe things are a bit more complicated depending on how FPC was installed and setup/configured. Without that knowledge all that can be said is to do the same as FPCUpdeluxe does but manually. The wiki describes the manual steps that can be used but the order in which is done where and what to do with the result can be a bit cumbersome to understand for the reader (if you've done it once you'll most probably get/understand it). Always be prepared to ruin your existing setup (so make backups for the important bits in case you care).  Thanks TRon, this has helped me to understand a bit better what is going on.