Sign in Join
Wiki copytemporary

FPC message: Can not find unit/fr: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## General hints
22
33Example:
44
5-` unit1.pas(40,42) Fatal: Can't find unit forms`
5+``` pascal
6+ unit1.pas(40,42) Fatal: Can't find unit forms
7+```
68
79The compiler didn't find a compatible forms.ppu file nor a source file (forms.pp or forms.pas or forms.p).
810
911The compiler searches in the unit path. The unit path is the sum of:
1012
1113- the fpc.cfg file (linux, macosx, bsd: /etc/fpc.cfg)
1214- the Lazarus compiler options. See Project -\> Compiler Options
1315 - -\> Paths -\> Other unit files
1416 - -\> Inherited -\> All inherited options -\> unit path (if available)
1517
1618**Note:** Even if there is a forms.ppu file in the unit path, the above message can appear, because FPC checks if the ppu file is valid (up to date). The .ppu file is valid, if all files it depends on are valid. If you install another FPC all .ppu files on your system become invalid and must be recompiled.
1719
1820## Can't find unit interfaces
1921
2022The 'interfaces' unit is the part of the LCL. You must use it at least once in your program to link in the LCL interface (the platform dependent part of the LCL. For instance gtk or win32). You see this error, if
2123
2224- Make sure the project uses the LCL package. See Project -\> Project Inspector -\> Required Packages. If there is no LCL click on the 'Add' button and then 'New Requirement', select the LCL and press Ok.
2325- Make sure the unit is part of the project. Use Project -\> Add editor file to project.
2426- Make sure the 'interfaces.ppu' is in the unit path, and the 'interfaces.pp' is **not** in the unit path. And that you only have one 'interfaces.ppu' in the unit path. You can see the unit path in Source Editor -\> Right mouse click -\> Popup Menu -\> Unit Info -\> Unit Paths.
2527- Make sure your compiled LCL fits to the installed compiler. For example if you installed a new compiler, then the LCL must be rebuilt (for example the interfaces.ppu must be rebuilt).
2628
2729## Can't find unit LResources
2830
2931Can be solved by doing "Tools/Build Lazarus"
3032
3133## Detailed description about this topic
3234
3335There is a detailed page about searching units here: [[Unit not found - How to find units]]
3436
3537---
3638*From the Free Pascal wiki, page "FPC message: Can not find unit/fr", as it stood on 2016-01-20 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history