[Lazarus] include file not found

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Feb 13 11:13:05 CET 2010


On Sat, 13 Feb 2010 10:10:36 +0100
Bernd Kreuss <prof7bit at googlemail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm trying to do something that might be done in a completely different
> way but I have no idea how. I'm trying to fix a bug in JCF2, the code
> formatting tool of lazarus.
> 
> I thought the best way to do this is make the changes to these files,
> recompile the IDE and see if it is fixed.

Yes.

 
> Therefore I started lazarus (a recent svn version that works just fine
> with all my other projects), opened the lazarus project lazarus.lpi and
> then in an editor window opened the file
> "C:\lazarus\components\jcf2\IdePlugin\JcfIdeMain.pas" as a starting
> point to find my way through this big bunch of code to find all the
> other parts of this puzzle. Since JCf2 is part of the IDE and compiled
> in, all of its files should belong to the project, right? Wrong!

Very wrong!
JCF2 is part of the package jcfidelazarus, so all its files should
belong to this package.

 
> Whenever I try to do any "find definition" in this file I immediately
> get the following error:
> 
> C:\lazarus\components\jcf2\IdePlugin\JcfIdeMain.pas(34,5) Error: include
> file not found "JcfGlobal.inc"

Not here. Here it works.

Check if you have the package jcfidelazarus installed.

 
> I have tried to use the project/compiler options to add include paths, i
> have tried the project inspector to add the file *itself*, i have tried
> almost any of the dozens of paths all across the project and IDE
> configuration dialogs but it just won't find this file.
> 
> What am I doing wrong?
> 
> 1) where does it search for files when I do a "find declaration" and how
> can I influence this? Are there any documents I should read? Are there
> any documents at all?

There are lots of docs in the wiki. 
About packages in general:
http://wiki.lazarus.freepascal.org/Lazarus_Packages

The lazarus.lpi is somewhat special, because it appears to be only the
basic IDE without any extra packages. Do not change any setting there.
First check the package.

 
> 2) what would be the correct way of doing what I am trying to do?

Check that you are in the right directory and that the
environment options show the correct paths.

Mattias




More information about the Lazarus mailing list