[Lazarus] Fatal: Cannot find IdMappedPortTCP used by xxxx
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Apr 23 12:18:48 CEST 2016
On Sat, 23 Apr 2016 11:38:28 +0200
Bo Berglund <bo.berglund at gmail.com> wrote:
>[...]
> >> I have googled and looked at old list messages but to no avail. The
> >> closest I got was someone telling me that Lazarus will handle this
> >> fine if only the lpk file is opened once. So I selected File/Open and
> >> navigated to the Indy10 installation dir and opened the IndyLaz.lpk
> >> file and then closed it. No difference at all! The used unit cannot be
> >> found....
> >
> >Open it once, so the IDE knows how to resolve a package name (and
> >version) to the location on your disk.
>
> Well, that was what I did to start with, but it did not help. Compile
> still complains.
Yes, as I explained, opening it once allows the IDE to resolve a package
name, e.g. "IndyLaz". After that you can use the package name in your
project, which is needed for compile.
The package knows the needed compiler flags including the search paths.
> So what I ended up doing was to go into the Project Options and in
> Paths added into "Compiler Options/Paths/Other unit files" the
> following:
> ../../dev/indy10/Core;../../dev/indy10/Protocols;../../dev/indy10/System
>
> Now the project builds but with this warning:
> Warning: other unit files search path (aka unit path) of "MapPort"
> contains "/home/pi/dev/indy10/Core", which belongs to package
> "indylaz"
Either add the package, or add flags manually. Don't do both.
> So it seems like for some reason Lazarus now thinks there are two ways
> to the Indy10 files...
There are.
> So I removed the entry in the project options shown above and then I
> compiled again. Now working without me understanding the logic behind
> it all.
Maybe it is not your fault. AFAIK the IndyLaz package is notorious for
fail to compile, because the compiler has sometimes trouble resolving
its unit dependencies. I will try to get a copy.
Mattias
More information about the Lazarus
mailing list