[Lazarus] [Lazarus 0012254]: Code tools bug: with Code completition

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 3 19:09:11 CEST 2008


On Fri, 3 Oct 2008 17:14:58 +0100
"Henry Vermaak" <henry.vermaak at gmail.com> wrote:

> On 03/10/2008, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> >> the unit dir as /path/to/compiledunits/$(TargetCPU)-$(TargetOS),
> >
> > The macros are normal. But this looks like an absolute path. Maybe
> > you meant compiledunits/$(TargetCPU)-$(TargetOS), relative to your
> > package?
> 
> it is absolute, but it's the right dir (and the compilation works, for
> both archs).

I doubt, that this is portable. How do you want to compile that on your
next/other computer? 


> >> and i
> >> specify the path to all the source so the ide can find it for
> >> completion, etc.
> >
> > What do you mean with specify?
> 
> i add all source paths to the "Other Sources (used only by IDE not
> compiler)".

Ok. 

Note: The recommended way is to add the files to your package. Then
the IDE will setup the paths automatically. And it can warn you about
common misconfigurations.

 
> > In lazarus you use packages to specify paths. You hardly write paths
> > yourself in the edit/combo boxes of the IDE.
> 
> the package in question (fpgui) doesn't play well when i cross
> compile.  it compiles the whole package every time i switch compiler
> (i386 to arm), which is annoying.  doing it this way it will find the
> compiled fpgui units for whichever arch, and just compile my project.
> this works well, so no problems there.

Apparently there is a problem, because switching targets should not
compile everything everytime.
The IDE compiles everything (-B switch), when something changed
compared to the data in the .compiled file of the output directory. If
you have one output directory for each target, then you have
one .compiled file per target and thus switching between targets should
not add the -B switch. Please backup a .compiled file, switch back and
forth and compile again. Compare the new .compiled file with the
backup. What difference do you see?


> > You can see the search paths via source editor / popup menu / file
> > settings / unit info. The 'unit path' is given to the compiler, the
> > 'source path' is an addition for the IDE. Both are normally defined
> > by the compiler options.
> 
> i've had a look at this "unit info" and all the paths are there and
> correct.
> 
> as i've said, it does find some of the units i ctrl-click on.  but it
> seems random and i _think_ it only finds source in the same directory
> as the file i'm clicking on.

Sending me an example project would help to solve the mystery. But with
your absolute path names it will probably not work here anyway.

What OS and what FPC version are you using?


Mattias



More information about the Lazarus mailing list