[Lazarus] Cannot find inc file from a registered package...
Bo Berglund
bo.berglund at gmail.com
Wed Jun 24 15:39:35 CEST 2020
On Tue, 23 Jun 2020 22:40:19 +0300, Juha Manninen via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
>Is the path containing the include file (Indy10\System or similar) in
>Indy package's include search path?
>If not then please add it.
>Otherwise it sounds like a bug. Unit files are found from required
>packages but apparently include files are not. Please report a bug
>with steps to reproduce.
>
To answer your question:
So I re-enabled the include and added a path below packages to it as
follows:
interface
{$I Indy10\System\IdCompilerDefines.inc}
{$I ssremote.inc}
uses
....
class_SSRemoteServer.pas(84,2) Fatal: Cannot open include file
"Indy10\System\IdCompilerDefines.inc"
Same with \ as with / as delimiter.
Butit worked when I did this, , but triggered other errors from inside
the inc file:
{$I
C:\Programs\Lazarus_2.0.8\config\onlinepackagemanager\packages\Indy10\System\IdCompilerDefines.inc}
Now working but the source file is cluttered with an installation path
that should not be there.
So I then went into project options/compiler options/paths
and I added this to the include path setting:
C:\Programs\Lazarus_2.0.8\config\onlinepackagemanager\packages\
Then I changed the source file include statement to:
{$I Indy10\System\IdCompilerDefines.inc}
This too worked, the file was found and parsed.
So this is the best solution, one has to remember to change it when
the project moves to a different lazarus version or platform.
It would have been good to be able to set something like $PACKAGEDIR
to C:\Programs\Lazarus_2.0.8\config\onlinepackagemanager\packages\ in
a Lazarus global context so all package files could be reached using
the env var. It then has to be set Lazarus globally like is possible
in Delphi.
But I found no such way...
HTH
--
Bo Berglund
Developer in Sweden
More information about the lazarus
mailing list