View Issue Details

IDProjectCategoryView StatusLast Update
0037271LazarusIDEpublic2020-07-06 11:53
ReporterBo Berglund Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.0.8 
Summary0037271: Include files from installed packages not found
DescriptionIf I use the following at the top of a unit in a project set to use package indylaz (as an example):
{$I IdCompilerDefines.inc}

Then when compiling an error "not found" is thrown.

If I open the package settings and check paths then the Include box is not filled in.
So I enter the same as is present in the other two boxes.

After this the issue still remains, the include file is not found.

If I enter the full path to it in the source file then the compiler accepts it and finishes without error.
This behaviour has been verified by Juha Manninen too
Steps To ReproduceInstall indylaz using OnLine Pakcake Manager
Create a test project which requires package indylaz
Enter the include command from the description immediately below the interface code word
Compile and observe the error message.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

Mattias Gaertner

2020-06-26 19:53

manager   ~0123604

A package has two sets of include paths. Those it uses for itself and those it adds to any user - project or package. By default a package does not add any include path.
I did not take a look the indylaz package, so I assume, it does not expose the mentioned include path.

Therefore the behaviour seems normal to me.

P.S.: on the mailing list I did not see that you added the $include directive to a project unit. I thought the error message was coming from the indylaz package. Maybe a misunderstanding.

Bo Berglund

2020-06-27 00:12

reporter   ~0123607

My start message on the mailing list in the thread about this is poorly worded:

"I am porting a Delphi application, which uses Indy10, to fpc/lazarus
and I have run into a problem regarding an include directive in one
source file:

interface
{$I IdCompilerDefines.inc}

This is a file within the Indy package, on Delphi it is found in the
Indy sources in the directory where the Indy10 package is installed:
Indy10\System\IdCompilerDefines.inc
And Delphi has no problem finding it."

It should have read:
This include file is a file within...

The location of the include directive is in one source unit that is part of the project, and not in the package itself.

Concerning the setting of the include file path, Juha Manninen thought it to be a bug since all other files would be found just not include files even though there is a box in the package properties to set the search path for the same....

Juha Manninen

2020-06-30 13:14

developer   ~0123679

Last edited: 2020-06-30 13:16

View 2 revisions

> A package has two sets of include paths. Those it uses for itself and those it adds to any user - project or package.

@Mattias, what is the other include path? I can see the -Fi path in options. Indy package has the needed "System" subdirectory there.
If Delphi can find an include file from an installed package, Lazarus/FPC should also find it.

Mattias Gaertner

2020-06-30 15:27

manager   ~0123681

The two sets:
Package Options / Usage
Package Options / Compiler Options

Juha Manninen

2020-06-30 18:17

developer   ~0123685

Ohh, I somehow forgot the Usage part, maybe never paid attention to it.
Yes adding ".;Core;Protocols;System" also to Usage -> Include solves the problem. The project compiles and Codetools finds the include file. Perfect!

Bo Berglund, can you verify it?
I guess that was the reason why I originally saw the ".;Core;Protocols;System" paths but you didn't. We were looking at different places.

The next step is to find the maintainer of Indy10 package and inform him. It is not a Lazarus bug, this report will resolve as "no change required".

Mattias Gaertner

2020-06-30 23:35

manager   ~0123692

I doubt that a project needs to use all these include files directly.
Maybe one of them?

Juha Manninen

2020-07-01 10:43

developer   ~0123696

Yes, I guess "System" would be enough.

Juha Manninen

2020-07-05 08:57

developer   ~0123759

Bo, ping ...

Cyrax

2020-07-05 11:09

reporter   ~0123760

I remember that this was fixed by author of the Indy components in his code. I do not remember if he used my patch from these posts : https://forum.lazarus.freepascal.org/index.php/topic,20782.msg178828.html#msg178828

Juha Manninen

2020-07-06 11:53

developer   ~0123774

I am resolving this as "no change required" although Bo did not answer.
I hope the Indy package will be updated. See the forum thread linked by Cyrax.

Issue History

Date Modified Username Field Change
2020-06-26 19:30 Bo Berglund New Issue
2020-06-26 19:53 Mattias Gaertner Note Added: 0123604
2020-06-27 00:12 Bo Berglund Note Added: 0123607
2020-06-30 13:14 Juha Manninen Note Added: 0123679
2020-06-30 13:16 Juha Manninen Note Edited: 0123679 View Revisions
2020-06-30 15:27 Mattias Gaertner Note Added: 0123681
2020-06-30 18:10 Juha Manninen Assigned To => Juha Manninen
2020-06-30 18:10 Juha Manninen Status new => assigned
2020-06-30 18:17 Juha Manninen Status assigned => feedback
2020-06-30 18:17 Juha Manninen LazTarget => -
2020-06-30 18:17 Juha Manninen Note Added: 0123685
2020-06-30 23:35 Mattias Gaertner Note Added: 0123692
2020-07-01 10:43 Juha Manninen Note Added: 0123696
2020-07-05 08:57 Juha Manninen Note Added: 0123759
2020-07-05 11:09 Cyrax Note Added: 0123760
2020-07-06 11:53 Juha Manninen Status feedback => resolved
2020-07-06 11:53 Juha Manninen Resolution open => no change required
2020-07-06 11:53 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-07-06 11:53 Juha Manninen Note Added: 0123774