[Lazarus] Codetools can't find units in 'other sources'
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Nov 11 17:30:45 CET 2010
On Thu, 11 Nov 2010 14:16:34 +0100
Joost van der Sluis <joost at cnoc.nl> wrote:
> On Thu, 2010-11-04 at 23:01 +0100, Mattias Gaertner wrote:
> > On Wed, 03 Nov 2010 11:24:55 +0100
> > Joost van der Sluis <joost at cnoc.nl> wrote:
> >
> > > On Tue, 2010-11-02 at 23:43 +0100, Mattias Gaertner wrote:
> > > > On Tue, 02 Nov 2010 19:13:46 +0100
> > > > Joost van der Sluis <joost at cnoc.nl> wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > The Lazarus Codetools are complaining that a unit can't be found. But it
> > > > > is available in the path I've given in the 'compiler-options' as 'Other
> > > > > Sources'.
> > > > >
> > > > > But also placing the path in 'other units /-Fu' doesn't help. Maybe
> > > > > something to do with the new buildmodes?
> > > >
> > > > What paths do you see in the 'Unit info'?
> > >
> > > The paths added for the packages being used (ideintf, lcl and my own
> > > Gecko package) and 'packager' (what is this?)
>
> > > So, unit-info, unit paths:
> >
> > For what directory?
> >
> > Let's assume you did that for directory X.
> >
> > > /home/svn/lazarus/ideintf/units/x86_64-linux
> > > /home/svn/lazarus/lcl/units/x86_64-linux
> > > /home/svn/lazarus/lcl/units/x86_64-linux/gtk2
> > > /home/svn/lazarus/packager/units/x86_64-linux
> > > /home/joost/.fppkg/share/doc/fpc-gecko-0.9.0-1/lazaruspackage/Components
> > >
> > > include paths:
> > > /home/joost/.fppkg/share/doc/fpc-gecko-0.9.0-1/lazaruspackage/Components
> > >
> > > Source paths:
> > > /home/joost/.fppkg/share/doc/fpc-gecko-0.9.0-1/lazaruspackage/Components
> > > /home/svn/lazarus/ideintf/units/x86_64-linux
> > > /home/svn/lazarus/lcl/units/x86_64-linux
> > > /home/svn/lazarus/lcl/units/x86_64-linux/gtk2
> > > /home/svn/lazarus/packager/units/x86_64-linux
> > > /local/svn/tiOPF2-trunk/Core
> > > /home/svn/lazarus/ideintf
> > > /home/svn/lazarus/lcl
> > > /home/svn/lazarus/lcl/widgetset
> > > /home/svn/lazarus/lcl/nonwin32
> > > /home/svn/lazarus/lcl/interfaces/gtk2
> > > /home/svn/lazarus/packager/registration
> > >
> > The directory X belongs to Y, which is a project or a package, which
> > uses the LCL, IDEIntf, tiopf and fpc-gecko.
>
> Ok, I have this problem again. (And I've heard of others with the same
> issue) A somewhat different setup.
>
> In this case the directory of the file I'm editing is the main
> project-path. (In fact I'm editing the .lpr)
Sorry for asking, but many people use 'editing the .lpr' as a metaphor
for all kinds of things.
Do you mean you have the Y.lpr open in the source editor and the IDE
can not find a unit in the lpr?
I recommend to not use the 'in' keyword in the uses section.
> So X belongs to the package Y. (The package I'm editing)
So, you are working on a project and a package. Both have
distinct options for their directories (and of course they do not
share any directories, except the ppu directory of the package).
And X belongs to the package, so it has the search paths of the
package, not the project.
> Now the path I'm looking for is in the 'other sources' setting for
> project Y: (not Z)
>
> > > While -Fu is: (compiler options)
> > > /home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/
The -Fu and the 'other sources' have nothing in common. The -Fu is set
by the 'Other unit files'.
The 'Other sources' is only needed in the rare case that you want to
achieve what is normally done by a package but you can not use a
package.
> > I guess you mean the compiler options of your project Z.
> > The Fu paths are not in the list of Y, so Z<>Y.
>
> No, the options are for project Y.
>
> > The question is: What is Y?
>
> No, question is: where is the bug?
>
> Why is the path which is set as 'other sources' in the project-settings
> not used by the codetools when I'm editing a file which belongs to the
> same project.
It works here.
If I understand correct:
You have set 'Other sources' to
'/home/svn/webdesign-trunk/geckoport/;...' and you have the Y.lpr open
in the source editor. Then you should see in the list of Unit info /
'Source paths' the '/home/svn/webdesign-trunk/geckoport/'.
It does *not* mean that a unit in '/home/svn/webdesign-trunk/geckoport/'
is seen by the compiler, nor does it mean that a unit in
'/home/svn/webdesign-trunk/geckoport/' can see the units of the project.
Mattias
More information about the Lazarus
mailing list