Search code examples
lazarus

cannot use Indy in lazarus


I am install Indy from Online package manager, but cannot use indy component like IdTCPClient in my project, it will alert error:

Fatal: Can't find unit IdTCPClient used by Unit1

my source code:

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, IdTCPClient;

type
  TForm1 = class(TForm)
  private

  public

  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

end.

and the package screenshot (means installed Indy proper):

enter image description here


Solution

  • In your project, go to Project->Project Inspector, then right click "requires Packages" and add indylaz