Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-07

Converting console app to Lazarus on RPi - Indy10 not found

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am trying to move a small Windows console program from Delphi2007 on to Lazarus 1.6 with FPC 3.0 on a Raspberry Pi 3.
So I used FTP to copy the project files over to RPi, then used Lazarus on the RPi and tried the tool for converting Delphi projects.

It stops at a point where it cannot find 6 Indy10 units used by the program. And the tool does not find them when searching either. What should I do next?

I do have Indy10 on my RPi in location /home/pi/dev/indy10 and it has been used previously in other projects.
The imported project is located in /home/pi/Projects/TCPCommTest.

I thought that Lazarus would remember the location of any such package once used, but it seems not to be the case...

What do I do now?

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
[...] It stops at a point where it cannot find 6 Indy10 units used by the program. And the tool does not find them when searching either. What should I do next?

Add Indy10 as requirement in the Project / Project Inspector.

Show quoted text 6 lines
I do have Indy10 on my RPi in location /home/pi/dev/indy10 and it has been used previously in other projects. The imported project is located in /home/pi/Projects/TCPCommTest. I thought that Lazarus would remember the location of any such package once used, but it seems not to be the case...

It does remember the location of the package.
The Search tool searches only within the .lpk files, not in all unit paths of all packages - that's on my todo list. Maybe Indy10 forgot to list all its units.

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote
Add Indy10 as requirement in the Project / Project Inspector.

Thanks, I added indylaz as requirement and now it finds the files as it should!

But now I am getting a different error message from a non-Indy problem:

I am using the Synopse PasZip unit to add zipping functionality to my program. When I moved it into Lazarus on an RPi3 I get the following error message:

PasZip.pas(60,3) Fatal: Cannot find LibC used by PasZip of the Project
Inspector.

This is the PasZip code that it complains about:

uses
{$ifdef MSWINDOWS}
  Windows,
{$else}
  LibC, <== Error here
  Types,
{$endif}
  SysUtils;

When I google this it seems like there has been some problems earlier with LibC and Lazarus, but I did not find a working solution.

What to do?

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 9 lines
On Wed, 13 Jul 2016 11:18:17 +0200, Mattias Gaertner wrote: [...] I am using the Synopse PasZip unit to add zipping functionality to my program. When I moved it into Lazarus on an RPi3 I get the following error message: PasZip.pas(60,3) Fatal: Cannot find LibC used by PasZip of the Project Inspector.

LibC was an ancient unit for Linux only. It vanished from FPC many years ago.
Its functions are now in units like Unix, BaseUnix, etc to support more platforms than Linux.

Show quoted text 15 lines
This is the PasZip code that it complains about: uses {$ifdef MSWINDOWS} Windows, {$else} LibC, <== Error here Types, {$endif} SysUtils; When I google this it seems like there has been some problems earlier with LibC and Lazarus, but I did not find a working solution. What to do?

Search the functions in FPC and use the new units.

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote
Search the functions in FPC and use the new units.

I switched to using the FPC unit Zipper instead and skip PasZip altogether if FPC is detected (conditional compile). Now working fine.

Bo Berglund Developer in Sweden

Reply by email