[Lazarus] Can't find unit LResources used by Component1

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jul 13 20:33:45 CEST 2011


On Wed, 13 Jul 2011 19:55:35 +0200
John Landmesser <JohnML at online.de> wrote:

>[...]
> fix is ok if you do it the way i explained above BUT:
> 
> remove component1.pas from the compiled example package above and add 
> component1.pas again to that package!
> I get the error message again: "component1.pas(8,22) Fatal: Can't find 
> unit LResources used by Component1"

Adding a unit to a package does not (yet) validate the uses section(s)
of the unit.

 
> And now we are at the root of my real problem - perhaps you remember 
> that thread - add the delphi unit findfile1.pas to a new  package with
> uses
>    Classes, SysUtils, , Forms, Controls, Graphics, Dialogs;
> 
> I allways get   "Can't find unit LResources used by findfile1"
> 
> i can add my findfile1.pas to a package if i reduce the uses clause to
> uses
>    Classes, SysUtils ;
> 
> But thats no solution, i want a component icon and therefor i need  
> "LResources"

Have you tried right clicking on the message?

There should be two menu entries:
- Remove unit from uses section
- Search unit

The second searches in all open packages and allows to add a dependency.


Mattias




More information about the Lazarus mailing list