Indy 10.6.1.5238 for Lazarus 1.2.6 with Debian 7.5 lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- ozoltan · 2015-01-24 17:32 Hi... I am trying to install Indy 10.6.1.5238 version under Lazarus 1.2.6 using Debian 7.5, but its not working... For install It works as described here: http://wiki.freepascal.org/Indy_with_Lazarus My problem is that after installing everything seems ok, but I cannot use Indy. A very simple program: ---------------------------------------------------------------------- ---------------------------------------------------------------------- -------- unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, IdIPWatch; type   { TForm1 }   TForm1 = class(TForm)     IdIPWatch1: TIdIPWatch;     procedure FormActivate(Sender: TObject);   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormActivate(Sender: TObject); begin   ShowMessage(Form1.IdIPWatch1.LocalIP); end; end. ---------------------------------------------------------------------- ---------------------------------------------------------------------- -------- It's not working. It compiles, the program runs, but it displays nothing. Also when I am writing the program, if I put a '.' after an object, then Lazarus should display the properties, events, etc of that object... For IdIpWatch1 object it displays nothing, but it compiles... I have tried to install previous versions of Indy: 10.6.1.5203 and 10.2.0.3... But none of them are working. All makes the same error... I dont understand... Can anybody help ? Thank You in advance! Zoltán ---------------------------------------------------------------------- ChrisF · 2015-01-25 00:43 If you can compile and run your program with an Indy component inside, most probably your installation is OK. What do you mean exactly by: "It's not working" ? Do you mean that the ShowMessage box is displayed with no data inside ? Or not displayed at all ? Anyway, it seems to me it's probably relative to the Linux implementation of Indy, as your test program is working OK here (but with a Windows OS). ** Edit ** AFAIK, displaying the properties/methods of an object is sometimes a bit "capricious" inside the Lazarus IDE. So, it's probably not a clue to your problem. ---------------------------------------------------------------------- ozoltan · 2015-01-25 06:06 Exactly as You say... Showmessage displays and empty string. Under Windows its working perfectly... My problem is that I have tried 2 previous versions of Indy, and I got the same result. No properties display when writing a program and not working - empty string. This is what I really dont understand... ---------------------------------------------------------------------- ChrisF · 2015-01-25 13:52 Have you tried some other functionalities of Indy (a few very common ones) ? Are they working properly ? Apparently, it seems that there was a problem with IDIpWatch.currentIP on Linux in the past: see http://forum.lazarus.freepascal.org/index.php?topic=8985.0 It may eventually be still not solved. I guess you may find a more appropriate answer to your specific problem in the Indy forum : http://forums2.atozed.com/ . Especially from Remy Lebeau, the current coder maintaining Indy. BTW, someone has reported me a problem to register to this forum recently: I don't know if it's now solved. ---------------------------------------------------------------------- ozoltan · 2015-01-25 16:27 No. I havent tried any other functionalities of Indy. From Indy I used only this IDIpWatch to get the current IP of the computer and another 2-3 objects to send emails... As far as I know on Indy 9.x the IDIpWatch property was called CurrentIP, it has been changed to LocalIp since Indy 10.x versions. The funny thing is that even if I write LocalIP or CurrentIP, Lazarus accepts both of them, no error message, but still not working... I have registered to the Indy forum, I will ask Remy Lebeau. Registering to Indy forum worked for me for the 2nd chance It has a question and the end of the registration form which wasnt clear enough for me for the 1st sight But it works ---------------------------------------------------------------------- ozoltan · 2015-01-26 09:20 Basically my problem is that Indy 10.2.0.3 was working on a prevous Lazarus, if I remember well then it was Lazarus 0.9.30 and on Debian 5.0.2 Now even that Indy is not working on Lazarus 1.2.6 and Debian 7.5 ---------------------------------------------------------------------- ChrisF · 2015-01-26 14:13 Interesting... Though I'm not sure it's relative to Lazarus, but perhaps to FPC instead. After a quick glance at the Indy source code, IdIPWatch uses threads for its functionalities (especially for the current IP address). So, I think it could be relative to the interactions between Indy and FPC concerning the thread implementation (but this is only a supposition of mine). Hereafter, a sample FPC program to make a test (not tested on a Linux OS). If you wish to make a test: - create a "Simple Program" project (i.e. without the LCL), - add Indy into the project dependencies, - use the following code Code: [Select]program project1; uses {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads, {$ENDIF}{$ENDIF}   IdIPWatch; var IsOK: Boolean; var MyIdIPWatch: TIdIPWatch; begin   IsOK := True;   try     MyIdIPWatch := TIdIPWatch.Create;   except     WriteLn('** Error when creating TIdIPWatch **');     IsOK := False;   end;   if IsOK then     begin       WriteLn('Current local IP = '+MyIdIPWatch.LocalIP);       MyIdIPWatch.Free;     end; end. ---------------------------------------------------------------------- ozoltan · 2015-01-26 20:28 Chris ... I have tried the code You have suggested me... The result is the same... It compiles and runs without problem, but the result is an empty string... ---------------------------------------------------------------------- ChrisF · 2015-01-27 00:14 Which means, as you've written it was working for Indy 10.2.0.3 and Lazarus 0.9.30, that it's probably the FPC version which is determinant in your case (don't know which one was used for this old version of Lazarus). And if it was OK with Indy 10.2.0.3 in the past, and no more now, it's -once again probably- because of a modification inside FPC. It seems that there is something wrong between Indy and FPC: relative to threads ? (the by-default use of the CThreads unit has been added "recently", AFAIK). And I guess there have been some other changes too. ---------------------------------------------------------------------- engkin · 2015-01-27 02:30 Don't you need to add to the custom options -dUseCThreads? ---------------------------------------------------------------------- ozoltan · 2015-01-27 10:54 ChrisF... Sorry.. I was mistaken... The previous version of Lazarus was 0.9.26.2 that came along with fpc 2.2.2.3 That was when I have used Indy 10.2.0.3 and it worked. It was under Debian 5.0.2 I am afraid that You are right concerning the modifications about Lazarus and fpc, because as I have described previously, none of the previous Indy versions - indy 10.2.0.3 and 10.6.1.5203 - is working now. All three versions makes the same error in Lazarus... So probably the problem must be somewhere much deeper... Engkin... The compiler did not complained about -dUseCThreads option, it compiled the little program that ChrisF asked me to test. Also I could run the test program, only the result is an empty string... ---------------------------------------------------------------------- balazsszekely · 2015-01-27 13:04 Hi Zoltan, You should try something like this: Code: [Select]uses IdHTTP; function GetMyIP(const IPAPI_URL: String; var IP: String): Boolean; var   SS: TStringStream;   IdHTTP: TIdHTTP; begin   Result := False;   IdHTTP := TIdHTTP.Create(nil);   try     IdHTTP.Request.UserAgent := 'Mozilla/5.0 (compatible; Test)';     IdHTTP.HandleRedirects := True;     SS := TStringStream.Create('');     try       IdHTTP.Get(IPAPI_URL, SS);       if IdHTTP.ResponseCode = 200 then       begin         IP := SS.DataString;         Result := True;       end;     finally       SS.Free;     end;   finally     IdHTTP.Free;   end; end; procedure TForm1.Button1Click(Sender: TObject); var   IP: String; begin   IP := '';   if GetMyIP('http://www.trackip.net/ip', IP) then     ShowMessage(IP); end;                If you cannot compile then: Menu-->Project-->Project Inspector-->Add-->New requirement-->Package Name-->IndyLaz-->Create New Requirement If you still have problems: Project Inspector-->Options-->Complier Options-->Other unit files-->Locate the indy directory. regards, GetMem ---------------------------------------------------------------------- ozoltan · 2015-01-27 14:31 Hi GetMem... Ur test program works!! That means that Indy is somehow working... BUT... Ur program displays my IP WAN address and not LAN IP address... That I got calling IdIPWatch.LocalIP My other problem is that when I want to use any Indy object, even IdHTTP... and while writing my program, when putting a '.' after and object, Lazarus used to display to properties, events, methods of that object... So if I am starting to use an object that I havent used it before, that way I can find out the capabilities of that object. But since for Indy objects Lazarus does not display its own little capability window... I have no idea what and how can I use But I am afraid that is some kind incompatibility between FPC / Lazarus and Indy... And mostly FPC / Lazarus, because Indy 10.2.0.3 was working for me previously... regards Zoltán ---------------------------------------------------------------------- ChrisF · 2015-01-27 17:07 Eventually, you can make another try with a modified version of my first FPC test program. It's supposed to make the second and third tests without any thread call; though I'm not sure there are not some other ones, called deeper in the Indy source code. Plus IPV4/IPV6 for the third one. Code: [Select]program project1; uses {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads, {$ENDIF}{$ENDIF}   SysUtils, IdIPWatch, IdStack, IdGlobal; var sResult: String; var IsOK: Boolean; var i: Integer; var MyIdIPWatch: TIdIPWatch; var LList: TIdStackLocalAddressList; begin   // First, the standard way   IsOK := True;   try     MyIdIPWatch := TIdIPWatch.Create;   except     WriteLn('** Error when creating TIdIPWatch **');     IsOK := False;   end;   if IsOK then     sResult := ('Local IP (1)= ' + MyIdIPWatch.LocalIP)   else     Exit;   // Then, using directly GStack.LocalAddress   sResult := sResult + sLineBreak + ('Local IP (2)= ' + GStack.LocalAddress);   // Finally, using directly GStack.GetLocalAddressList (whole list)   IsOK := True;   try     LList := TIdStackLocalAddressList.Create;     GStack.GetLocalAddressList(LList);     for i :=0 to Pred(LList.Count) do       begin         sResult := sResult + sLineBreak + ('Local IP (3)= [' + IntToStr(Succ(i)) +'] ' + LList[i].IPAddress);         if LList[I].IPVersion = Id_IPv4 then           sResult := sResult + ' [IPV4]'         else           sResult := sResult + ' [IPV6]';       end;   except     WriteLn('** Error when getting TIdStackLocalAddressList **');     IsOK := False;   end;   // Free resources   LList.Free;   MyIdIPWatch.Free;   if not IsOK then     Exit;   // Display the results   Writeln(sResult); end. ** Edit ** BTW, have you an IPV4 or an IPV6 local IP ? If you've got an IPV6 one, according to the comments into the Iny source code, it could explain why you only get a empty result. in IdStack, function GetLocalAddress (and some others): Code: [Select]    // for backwards compatibility, return only IPv4 addresses ...     GetLocalAddressList(LList);     for I := 0 to LList.Count-1 do begin       if LList[I].IPVersion = Id_IPv4 then begin         Result := LList[I].IPAddress;         Exit;       end;     end; ... ** Edit2 ** Have you tried CTRL+SPACE after the '.' character to try to force the display of the object/class properties ? ---------------------------------------------------------------------- ozoltan · 2015-01-27 17:42 Hi ChrisF... I have tested this 2nd test program of Urs... the result is the following: ---------------------------------------------------------------------- --------------------------------------------------------------- zoltan@debian:~/test2$ ./project2 Local IP(1)= Local IP(2)= zoltan@debian:~/test2$ ---------------------------------------------------------------------- --------------------------------------------------------------- Still empty string The command GStack.GetLocalAddressList(LList); probably returns with LList=Nil because nothing else is displayed According to ifconfig, my laptop has IPV4 type LAN address...  Well... It seems to me that I got some very real deep problem... As I get back to my workplace i will try the email function, because that is what I need more... regards Zoltán ---------------------------------------------------------------------- balazsszekely · 2015-01-27 19:28 QuoteMy other problem is that when I want to use any Indy object, even IdHTTP... and while writing my program, when putting a '.' after and object, Lazarus used to display to properties, events, methods of that object... So if I am starting to use an object that I havent used it before, that way I can find out the capabilities of that object. But since for Indy objects Lazarus does not display its own little capability window... I have no idea what and how can I use But I am afraid that is some kind incompatibility between FPC / Lazarus and Indy... And mostly FPC / Lazarus, because Indy 10.2.0.3 was working for me previously... I recently installed Indy 10.6.1.0 to Lazarus 1.2.6(Windows 7(32/64), Linux Ubuntu 14.0 LTS, OSX Mavericks). I have absolutely no problem with the code inside. Indy is working just fine, except TIdIPWatch.LocalIP which it fails on linux(when I will have more free time, I will try to figure it out why it fails) QuoteUr test program works!! That means that Indy is somehow working... BUT... Ur program displays my IP WAN address and not LAN IP address... That I got calling IdIPWatch.LocalIP As a quick workaround use this function: Code: [Select]program Project1; {$mode objfpc}{$H+} uses   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}   Classes,   Process,   SysUtils   { you can add units after this }; function GetLocalIP: String; var   Buffer: array[0..32000] of char;   ReadCount: Integer;   ReadSize: Integer;   Process: TProcess; begin   Result := '';   Process := TProcess.Create(nil);   try     Process.Executable := 'hostname';     Process.Parameters.Add('--ip-address');     Process.Options := [poUsePipes, poStderrToOutPut];     Process.Execute;     while Process.Running do       Sleep(1);     ReadSize := Process.Output.NumBytesAvailable;     ReadSize := SizeOf(Buffer);     if ReadSize > 0 then     begin       ReadCount := Process.Output.Read(Buffer, ReadSize);       if ReadCount > 0 then         Result := Copy(Buffer,0, ReadCount);     end   finally     Process.Free;   end; end; begin   writeln(GetLocalIP);   readln(); end. If you need more info: Code: [Select]    Process.Executable := 'ifconfig';     Process.Parameters.Add('-a');Then scoop the data you need. ---------------------------------------------------------------------- ozoltan · 2015-01-27 20:32 On Windows 7 / 32 it works fine for me Indy 10.6.1.0.5203. I have tried installing version 5238, but I started the problems that I have mentioned above. As I get back to my workplace I will test it with my email program... But Ur program shows me a lot of things Thx for that And of course THANK YOU for everyone who tried to help me on this forum Anyone who has some idea that h can this Indy put to work normally - as on Windows and as it worked before - I will be very grateful and happy if shared with me and the forum Sincerelly Zoltán ---------------------------------------------------------------------- ozoltan · 2015-01-29 09:49 Back to workplace and I could try my email send test program. It works That means that Indy works under Lazarus / Debian... Except of minor problems... Eg. my initial problem. That problem still exists that Lazarus does not display the properties, events, methods little window when writing program. So first I have to write the program under windows, then I can port it to Linux... Hoping that it work well under Linux too... Lets hope this will change in the future Here is my test program : ---------------------------------------------------------------------- ----------------------------------------------------------------- unit emtest2; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,   StdCtrls, IdSMTP, IdMessage,IdAttachmentFile, IdMessageCoderMIME; type   { TEmTestF }   TEmTestF = class(TForm)     BAddAttach: TButton;     Bevel1: TBevel;     BSend: TButton;     IdMsg: TIdMessage;     IdSMTP: TIdSMTP;     Label1: TLabel;     Label2: TLabel;     LBAttach: TListBox;     LEAddresses: TLabeledEdit;     LEBCopies: TLabeledEdit;     LECopies: TLabeledEdit;     LEFrom: TLabeledEdit;     LESMTP: TLabeledEdit;     LESubject: TLabeledEdit;     LEUsername: TLabeledEdit;     Memo1: TMemo;     OpenDlg: TOpenDialog;     procedure FormOnClose(Sender: TObject; var CloseAction: TCloseAction);     procedure FormOnActivate(Sender: TObject);     procedure BAddAttachClick(Sender: TObject);     procedure BSendClick(Sender: TObject);     procedure FormOnCreate(Sender: TObject);   private     { private declarations }     function UTF8ToDos(StrIn:shortstring):shortstring;   public     { public declarations }   end; var   EmTestF: TEmTestF; implementation {$R *.lfm}   var Activated:boolean; {********************************************************************} procedure TEmTestF.FormOnCreate(Sender: TObject); begin  Activated:=False; end; { procedure TEmTestF.FormOnCreate } {********************************************************************} procedure TEmTestF.FormOnActivate(Sender: TObject); begin  if Not Activated then    begin     Activated:=True;     EmTestF.LBAttach.Items.Clear; //      árvíztűrő tükörfúrógép - test string with hungarian chars //      ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP    end; { if Not Activated then } end; { procedure TEmTestF.FormOnActivate } {********************************************************************} procedure TEmTestF.BAddAttachClick(Sender: TObject); begin  if EmTestF.OpenDlg.Execute then    begin     TIdAttachmentFile.Create(EmTestF.IdMsg.MessageParts,EmTestF.OpenDl g.FileName);     EmTestF.LBAttach.Items.Add(EmTestF.OpenDlg.FileName);    end; { if EmTestF.OpenDlg.Execute then } end; { procedure TEmTestF.BAddAttachClick } {********************************************************************} function TEmTestF.UTF8ToDos(StrIn:shortstring):shortstring;  { Needs this conversion subroutine that the hungarian characters }  { should be displayed correctly by the receiver }   var s0,s1:shortstring;       i:word; begin  s0:=StrIn;  s1:='';  if Length(s0)>0 then    for i:=1 to Length(s0) do     if Not(s0 in [#$C3,#$C5]) then       case s0 of        #$AD:s1:=s1+#$ED; { í }        #$A9:s1:=s1+#$E9; { é }        #$A1:s1:=s1+#$E1; { á }        #$B1:s1:=s1+#$FB; { ű }        #$91:s1:=s1+#$F5; { ő }        #$BA:s1:=s1+#$FA; { ú }        #$B6:s1:=s1+#$F6; { ö }        #$BC:s1:=s1+#$FC; { ü }        #$B3:s1:=s1+#$F3; { ó }        #$8D:s1:=s1+#$CD; { Í }        #$89:s1:=s1+#$C9; { É }        #$81:s1:=s1+#$C1; { Á }        #$B0:s1:=s1+#$DB; { Ű }        #$90:s1:=s1+#$D5; { Ő }        #$9A:s1:=s1+#$DA; { Ú }        #$96:s1:=s1+#$D6; { Ö }        #$9C:s1:=s1+#$DC; { Ü }        #$93:s1:=s1+#$D3; { Ó }        else         if Byte(s0)<=128 then           s1:=s1+s0                             else           s1:=s1+'_';       end; { case }  UTF8ToDos:=s1; end; { function TEmTestF.ConvertUTF8ToDos } {*******************************************************************} procedure TEmTestF.BSendClick(Sender: TObject);   var i:word;       s0:shortstring; begin  EmTestF.IdSMTP.Host:=EmTestF.LESMTP.Text;  EmTestF.IdSMTP.Port:=25;  EmTestF.IdSMTP.AuthType:=satNone;  EmTestF.IdSMTP.Username:=EmTestF.LEUsername.Text; // EmTestF.IdMsg.AttachmentEncoding:='MIME'; // EmTestF.IdMsg.Encoding:=meMIME;  EmTestF.IdMsg.NoDecode:=False;  EmtestF.IdMsg.NoEncode:=False;  EmTestF.IdMsg.Recipients.EMailAddresses:=EmTestF.LEAddresses.Text;  EmTestF.IdMsg.From.Text:=EmTestF.LEFrom.Text;  EmTestF.IdMsg.Subject:=EmTestF.UTF8ToDos(EmTestF.LESubject.Text);  EmTestF.IdMsg.CCList.EMailAddresses:=EmTestF.LECopies.Text;  EmTestF.IdMsg.BccList.EMailAddresses:=EmTestF.LEBCopies.Text;  EmTestF.IdMsg.Body.Clear;  for i:=0 to EmTestF.Memo1.Lines.Count-1 do   begin    s0:=EmTestF.Memo1.Lines;    s0:=EmTestF.UTF8ToDos(s0);    EmTestF.IdMsg.Body.Add(s0); { use this because TMemo has a bug with UTF8 }   end; { for }  EmTestF.Memo1.Lines.SaveToFile('memo1.txt');  try   EmTestF.IdSMTP.Connect;   try    EmTestF.IdSMTP.Send(EmTestF.IdMsg);   except    ShowMessage('Cannot send the email !');   end; { try }   EmTestF.IdSMTP.Disconnect;  except   ShowMessage('Cannot connect to SMTP server !');  end; { try }  if EmTestF.IdMsg.MessageParts.Count>0 then    EmTestF.IdMsg.MessageParts.Clear; end; { procedure TEmTestF.BSendClick } {********************************************************************} procedure TEmTestF.FormOnClose(Sender: TObject; var CloseAction: TCloseAction); begin  Activated:=False;  CloseAction:=caFree; end; { procedure TEmTestF.FormOnClose } {********************************************************************} end. ---------------------------------------------------------------------- ----------------------------------------------------------------- Thank You very much for everybody who tried to help me and helped a lot Sincerelly Zoltán ---------------------------------------------------------------------- balazsszekely · 2015-01-29 12:55 Hi Zoltán, QuoteThat problem still exists that Lazarus does not display the properties, events, methods little window when writing program. Try this: 1. Lazarus Menu-->Project-->Project Options-->Complier Options-->Other unit files-->Locate the indy directory(see attachment, just change Indy 10.5.8.0 to whatever your current version is). Rebuild your application...now test if the properties, events are displayed(source code autocompletion is working properly) 2. If you still have problems with code insight: After typing "IdSMTP." press [CTRL] + [SPACE] regards, GetMem ---------------------------------------------------------------------- ozoltan · 2015-01-30 08:02 Hi GetMem... I have tried these 2 solution that U have suggested me and here are the results: - for adding the Indy directory, nothing changes... - the [CTRL+SPACE] throwed me into unti IdGlobal.pas, line 1681: ---------------------------------------------------------------------- ---------------------------------------------------------------------- ----- procedure IdDisposeAndNil(var Obj); {$IFDEF USE_INLINE}inline;{$ENDIF} var   {$IFDEF UNIX}   // For linux the user needs to set this variable to be accurate where used (mail, etc)   GOffsetFromUTC: TDateTime = 0 {$IFDEF HAS_DEPRECATED}deprecated{$ENDIF};         // <<-- line 1681     {$IFDEF DARWIN}   GMachTimeBaseInfo: TTimebaseInfoData;     {$ENDIF}   {$ENDIF}   IndyPos: TPosProc = nil; {$IFDEF UNIX} const   {$IFDEF HAS_SharedPrefix}   LIBEXT = '.' + SharedSuffix; {do not localize}   {$ELSE}     {$UNDEF LIBEXT_IS_DYLIB}     {$IFDEF DARWIN}       {$DEFINE LIBEXT_IS_DYLIB}     {$ELSE}       {$IFDEF IOS}         {$IFNDEF CPUARM}           // iOS Simulator           {$DEFINE LIBEXT_IS_DYLIB}         {$ENDIF}       {$ENDIF}     {$ENDIF}     {$IFDEF LIBEXT_IS_DYLIB}   LIBEXT = '.dylib'; {do not localize}     {$ELSE}   LIBEXT = '.so'; {do not localize}     {$ENDIF}   {$ENDIF} {$ENDIF} ---------------------------------------------------------------------- ---------------------------------------------------------------------- ----- While Lazarus gave the following error message: "/usr/share/lazarus/1.2.6/components/indylaz_v105203/IdGlobal.pas(1681 ,56) Error: expected ;, but deprecated found" If I am not mistaken then this seems to me that Lazarus does not understands the "deprecated" directive... Regards Zoltán ---------------------------------------------------------------------- balazsszekely · 2015-01-30 20:36 QuoteI have tried these 2 solution that U have suggested me and here are the results: - for adding the Indy directory, nothing changes... - the [CTRL+SPACE] throwed me into unti IdGlobal.pas, line 1681: I did not believed you , so I decided to install Debian 7.8 to a virtual machine. It turns out you were right, code completion it's not working properly. The good news is that I found the solution and it's quite trivial: 1. First I had to set permission for the IdGLobal.pas(it was read only) 2. Secondly I removed the following code Code: [Select]{$IFDEF HAS_DEPRECATED}deprecated{$ENDIF}; So line 1681 should look like this: Code: [Select]GOffsetFromUTC: TDateTime = 0;I double checked on other Linux distros... https://www.youtube.com/watch?v=_ZmbbGu_GM0&feature=youtu.be (watch in full screen, 720p) ---------------------------------------------------------------------- ozoltan · 2015-01-31 08:59 Hi GetMem! THANK YOU very much that U did not believed me and U have tried So now I have proof that I am not talking nonsense things Unfortunately Lazarus installs itself into /usr/share directory, which is read-only by default, so it is very adviceable that U should set to read-write the whole Lazarus directory, especially if U want to install other components like Zeos database modul, PowerPdf, fpsreadsheet, etc... -->> "chmod -R a+w lazarus"  Maybe its not a too good idea because of security reasons, then it should be installed somewhere else... Anyway, Lazarus needs read-write rights to its own directory... If I am not mistaken... The deprecated clause... It seems that it is a Delphi directive that Lazarus does not understand. I was afraid to remove, because I had no idea what may cause... So thank You again GetMem! U helped me a lot Have a nice day! Now I will have Sincerely Zoltán ---------------------------------------------------------------------- Leledumbo · 2015-01-31 13:29 Quote from: ozoltan on January 31, 2015, 09:59:47 amUnfortunately Lazarus installs itself into /usr/share directory, which is read-only by default, so it is very adviceable that U should set to read-write the whole Lazarus directory, especially if U want to install other components like Zeos database modul, PowerPdf, fpsreadsheet, etc... -->> "chmod -R a+w lazarus"  Maybe its not a too good idea because of security reasons, then it should be installed somewhere else... Anyway, Lazarus needs read-write rights to its own directory... If I am not mistaken... No need, if Lazarus finds out that its directory is read-only, it will output compiled units and packages to $HOME/.lazarus. There's no obligation for packages to live under components folder, they can be anywhere accessible, Lazarus will remember their location. Quote from: ozoltan on January 31, 2015, 09:59:47 amUThe deprecated clause... It seems that it is a Delphi directive that Lazarus does not understand. I was afraid to remove, because I had no idea what may cause... Lazarus should understand, since FPC does: http://wiki.freepascal.org/Hint_Directives ---------------------------------------------------------------------- ozoltan · 2015-01-31 15:09 Ok Leledumbo... I will try to put the additional packages somewhere else, to see that really Lazarus observes that its home directory its read-only or not. My experience it that some of the packages it compiles under its home directory, and some of them under the $HOME/.lazarus directory. It depends on the package. But I have put the components under Lazarus home directory... If Lazarus understands the "deprecated" clause, then why it fails using it under Indy ? Because I have tried what GetMem told, me and commenting out that directive in IdGlobal.pas, line 1681, Indy components immediately start to be shown correctly in the code completition... Try pls out the same what GetMem did... U will see ---------------------------------------------------------------------- balazsszekely · 2015-01-31 15:53 Lazarus does understand deprecated keyword, that line fails because the syntax is incorrect. On other Linux distros it's not even there(so you can safely remove it). Deprecated example: Code: [Select]  TTest = class   private     function TestTest: string; deprecated 'do not use this function'; //<-- custom message for the user   public     constructor create;     destructor destroy; override;   end;      function TTest.TestTest: string; begin   //...   Result := 'fadfas'; end; constructor TTest.create; begin   //... end; destructor TTest.destroy; begin   //...   inherited destroy; end;          //.... We create an instance of the TTest class: Code: [Select]var   Test: TTest; begin    Test := TTest.create;    try      Test.TestTest; //<--compiler warning here    finally      Test.Free;    end; end;      When you compile this code, you will get a warning: Quoteunit1.pas(49,17) Warning: Symbol "TestTest" is deprecated: "do not use this function"So basically the deprecated keyword is just a way to warn the user about the status of a function, method, etc... ---------------------------------------------------------------------- ozoltan · 2015-02-05 14:06 So it seems that my problem is mainly solved... Ok, still cannot get simply the localip of the client computer, but I will overcome of that problem somehow I found a way how to install indy 10.6.1.5238, it works and I can get the code completition little window while writing program Thank You for everyone who tried and could help me I appreciate very much For me this topic can be closed... Thx for everyone Zoltán