Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

Codetools can't find units in 'other sources'

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

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?

Joost.

Reply by email

Mattias Gaertner
to Joost van der Sluis
Show quoted text 8 lines
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'?

Mattias

Reply by email

Joost van der Sluis
to Mattias Gaertner
Mattias Gaertner wrote 13 lines
On Tue, 02 Nov 2010 19:13:46 +0100 Joost van der Sluis 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:
/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

(I'm curious why tiopf is there, and nonwin32. I do use them but not in this project.)

While -Fu is: (compiler options)
/home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/

And Other Soruces: (compiler options)
/home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/

Joost

Reply by email

Mattias Gaertner
to Joost van der Sluis
Show quoted text 17 lines
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 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?)

The 'FCL' package. The stuff for registering the
package and the units. At the moment only the IDE uses this to let design time packages register themselves.

So, unit-info, unit paths:

For what directory?

Let's assume you did that for directory X.

Show quoted text 25 lines
/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 (I'm curious why tiopf is there, and nonwin32. I do use them but not in this project.)

'nonwin32' comes from the LCL.
The directory X belongs to Y, which is a project or a package, which uses the LCL, IDEIntf, tiopf and fpc-gecko.

While -Fu is: (compiler options) /home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/

I guess you mean the compiler options of your project Z. The Fu paths are not in the list of Y, so ZY.

The question is: What is Y?

And Other Soruces: (compiler options) /home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/

Please read this:
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Other_sources

Mattias

Reply by email

Joost van der Sluis
to Mattias Gaertner
Mattias Gaertner wrote 52 lines
On Wed, 03 Nov 2010 11:24:55 +0100 Joost van der Sluis 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 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) So X belongs to the package Y. (The package I'm editing)

Now the path I'm looking for is in the 'other sources' setting for project Y: (not Z)

Show quoted text 5 lines
> While -Fu is: (compiler options) > /home/svn/webdesign-trunk/geckoport/;/home/svn/webdesign-trunk/geckoport/each-version/ I guess you mean the compiler options of your project Z. The Fu paths are not in the list of Y, so ZY.

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.

Joost.

Reply by email

Mattias Gaertner
to Joost van der Sluis
Show quoted text 59 lines
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 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 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.

Show quoted text 5 lines
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.

Show quoted text 12 lines
> I guess you mean the compiler options of your project Z. > The Fu paths are not in the list of Y, so ZY. 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

Reply by email