[SOLVED] Fatal: Cannot find unit system used by fcllaz of package FCL. lazarus / 31-LCL ---------------------------------------------------------------------- Hopestation · 2016-12-13 12:37 Hi. I have been using Lazarus 1.4 for some time but suddenly I have got this message I'm using Windows10 so I installed version lazarus-1.6.2-fpc-3.0.0-win64.exe thinking a new installation would solve the problem. After the installation I tried to compile my program again and got the same message. I have changed the FPC source directory to C:\lazarus\fpc\3.0.0\source\. This hasn't made any difference. How do I solve this? Thanks ---------------------------------------------------------------------- Thaddy · 2016-12-13 12:44 You seem to have an old fpc.cfg somewhere... When you install Lazarus it will always check first if everything is ok. With a dialog at first run. Did you get that dialog? Did you make sure everything said OK (all tabs) If not report back. ---------------------------------------------------------------------- Hopestation · 2016-12-13 16:08 Thanks for replying, Thaddy. I have deleted the previous installation of Lazarus  1.6.2. and reinstalled it in a new directory. There were no error messages in the start-up page in any of the tabs so I started the IDE. I compiled a default page without a problem, but when I loaded the program I couldn't compile before:- program Labels9; {$mode objfpc}{$H+} uses   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}   Interfaces, Forms, DBFLaz, printer4lazarus,   labels_09, data_09, page_09, print_9; {$R *.res} begin   Application.Initialize;   Application.CreateForm(TFrm_Lbls, Frm_Lbls);   Application.CreateForm(TFrm_Data, Frm_Data);   Application.CreateForm(TFrm_Page, Frm_Page);   Application.Run; end.                    I got: Compile package FCL 1.0.1: Exit code 1, Errors 1 Fatal: Cannot find system used by fcllaz of package FCL A search for fpc.cfg in my Lazarus-1 directory shows it in: C:\Lazarus-1\fpc\3.0.0\bin\x86_64-win64 In Tools/Environment/files the FPC source directory is set to: $(LazarusDir)fpc\$(FPCVer)\source Is this the problem? ---------------------------------------------------------------------- Hopestation · 2016-12-16 19:19 Continuing from my last reply. I also have Lazarus 1.4 installed on an old PC running windows XP SP3. I can compile programs saved on that PC but when i copy my Labels project files onto that PC I get the same error message when I compile it. This shows that the error is associated with the project, not the Lazarus settings. I have looked in Project Options but can't see what I should change to solve the problem. I also have a PC running Linux Mint 1.8. I can compile the project files on this PC. Does this make it easier to suggest a reason for this sudden appearance of the problem? ---------------------------------------------------------------------- molly · 2016-12-16 20:00 Project options, verbosity, show everything (-va) will show you which fpc.cfg is loaded, how options/settings are interpreted and which directories are searched for. It looks like your used fpc.cfg has the standard unit directories overridden or looking at the wrong location(s). ---------------------------------------------------------------------- lainz · 2016-12-16 20:19 I have this problem sometimes, but is a problem of a single project. Because other projects compile well. ---------------------------------------------------------------------- Hopestation · 2016-12-17 11:03 Thanks molly. I set up verbosity as you suggested but still got the same message, so I looked again and tried Test. This gave the following result: HINT: using config file C:\lazarus-1\fpc\3.0.0\bin\x86_64-win64\fpc.cfg ERROR: compiled FPC unit not found: system.ppu ERROR: compiled FPC unit not found: objpas.ppu ERROR: compiled FPC unit not found: sysutils.ppu ERROR: compiled FPC unit not found: classes.ppu ERROR: compiled FPC unit not found: avl_tree.ppu ERROR: compiled FPC unit not found: zstream.ppu I've checked and fpc.cfg does exist in the directory shown above. Looking at Compiler Options/ Config and Target I found that the OS was set to Linux. Changing it to Win64 solved the problem. I hadn't understood that I couldn't just copy the project to any OS and compile it. ---------------------------------------------------------------------- Leledumbo · 2016-12-18 14:30 Quote from: Hopestation on December 17, 2016, 12:03:02 pmI hadn't understood that I couldn't just copy the project to any OS and compile it. Yes, you can, as long as target options stay default (that will take the value the IDE is compiled for). Specifying specific platform will always target that platform, regardless the platform you open the project on.