Difference between revisions of "FPC message: Can not find unit"

From Free Pascal wiki
Jump to navigationJump to search
 
Line 1: Line 1:
 +
== General hints ==
 +
 
Example:
 
Example:
 
   unit1.pas(40,42) Fatal: Can't find unit forms
 
   unit1.pas(40,42) Fatal: Can't find unit forms
Line 12: Line 14:
  
 
'''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.
 
'''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.
 +
 +
== Can't find unit interfaces ==

Revision as of 18:32, 17 May 2006

General hints

Example:

 unit1.pas(40,42) Fatal: Can't find unit forms

The compiler didn't found a compatible forms.ppu file nor a source file (forms.pp or forms.pas or forms.p).

The compiler searches in the unit path. The unit path is the sum of:

  • the fpc.cfg file (linux, macosx, bsd: /etc/fpc.cfg)
  • the Lazarus compiler options. See Project -> Compiler Options
    • -> Paths -> Other unit files
    • -> Inherited -> All inherited options -> unit path (if available)

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.

Can't find unit interfaces