[Lazarus] Fatal: Cannot find IdMappedPortTCP used by xxxx

Bo Berglund bo.berglund at gmail.com
Sat Apr 23 10:12:33 CEST 2016


I am again very confused about how Lazarus works.
First I created a GUI program to test TCP port forwarding using the
Indy10 component TIdMappedPortTCP. Indy 10 is installed in my Lazarus.

I created a class to encapsulate the functionality and this class uses
the IdMappedPortTCP file from Indy.
All went well and now I am trying to move this over to a non-GUI
program, so I created a new "Program" in Lazarus and saved it to the
same directory as my earlier GUI test.
I also entered the tcpmapper into the program uses clause and
proceeded to define a variable of the class in tcpmapper to handle the
processing. Lazarus does find tcpmapper, and parses its code.

But now it all breaks down! I can for the life of me not get tcpmapper
to pass the compiler even though it did when used from the GUI
application!
It complains about not finding IdMappedPortTCP.

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....

So it seems like if one creates a non-GUI application in Lazarus then
the packages installed in Lazarus are not available anymore. :(
Note:
the Indy10 components are all non-GUI in the first place and I usually
always create them in code.

How to solve this?


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list