<div dir="ltr">Hi Mattias and All Others,<br><br><div class="gmail_quote">2008/7/25 Mattias Gaertner <<a href="mailto:nc-gaertnma@netcologne.de">nc-gaertnma@netcologne.de</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, 25 Jul 2008 09:05:24 +1000<br>
"Peter Williams" <<a href="mailto:pewtas@gmail.com">pewtas@gmail.com</a>> wrote:<br>
<br>
> Hello All Lazarus Users,<br>
><br>
> I'm getting a very odd error message when I try to build the following<br>
> simple project.<br>
><br>
> Error message:<br>
><br>
> do_the_macarena.lpr(1,1) Fatal: Can't find unit URIParser used by<br>
> XMLRead<br>
<br>
</div><a href="http://wiki.lazarus.freepascal.org/Unit_not_found_-_How_to_find_units" target="_blank">http://wiki.lazarus.freepascal.org/Unit_not_found_-_How_to_find_units</a><br>
</blockquote><div><br>I used the search app of my Linux Kubuntu OS and found that the 'missing unit' actually exists TWICE on my system. However I don't understand what setting I need to change to make Lazarus (or Free Pascal Compiler) find a copy of the unit. Please help me if you can.<br>
<br>/usr/share/fpcsrc/packages/base/netdb/uriparser.pp<br>/usr/share/fpcsrc/utils/fppkg/fcl20/uriparser.pp<br><br>Also, it is mystery to me why Lazarus (or FPC) even wants these units, as I'm not parsing anything nor creating XML files.<br>
<br>Finally, can someone who is responsible for the Free Pascal Compiler please delete one of the copies of "uriparser.pp" -- since I believe that it is wrong for it to be included twice... once should be enough. Also, having the file twice increases the possibility of errors ('cos you don't know which copy will be used).<br>
<br>I *DID READ* the URL page listed above... and with all due respect it is the biggest load of gibberish that I've read in a long time!!! For example, it [the article] asks me to determine whether or not Free Pascal Compiler or Lazarus can find the missing unit -- without telling me how to find out! *THIS IS EXTREMELY FRUSTRATING !!!!* <br>
<br>Hopefully looking forward to some help. Thanks in advance. *SMILE*<br><br>Fond Regards,<br>             PEW<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Mattias<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
><br>
> ----- file "do_the_macarena.lpr "<br>
> program do_the_macarena;<br>
><br>
> {$mode objfpc}{$H+}<br>
><br>
> uses<br>
>   {$IFDEF UNIX}{$IFDEF UseCThreads}<br>
>   cthreads,<br>
>   {$ENDIF}{$ENDIF}<br>
>   Interfaces, // this includes the LCL widgetset<br>
>   Forms<br>
>   { you can add units after this }, Unit1;<br>
><br>
> begin<br>
>   Application.Initialize;<br>
>   Application.CreateForm(TForm1, Form1);<br>
>   Application.Run;<br>
> end.<br>
> ------- end of lpr file.<br>
><br>
> ------ file "unit1.pas"<br>
> unit Unit1;<br>
><br>
> {$mode objfpc}{$H+}<br>
><br>
> interface<br>
><br>
> uses<br>
>   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,<br>
> StdCtrls,<br>
>   ExtCtrls;<br>
><br>
> type<br>
><br>
>   { TForm1 }<br>
><br>
>   TForm1 = class(TForm)<br>
>     Edit1: TEdit;<br>
>     Label1: TLabel;<br>
>     Label2: TLabel;<br>
>     Timer1: TTimer;<br>
>     procedure Edit1KeyUp(Sender: TObject; var Key: Word; Shift:<br>
> TShiftState);<br>
>     procedure FormCreate(Sender: TObject);<br>
>     procedure Timer1Timer(Sender: TObject);<br>
>   private<br>
>     { private declarations }<br>
>   public<br>
>     { public declarations }<br>
>   end;<br>
><br>
> var<br>
>   Form1: TForm1;<br>
><br>
> Type<br>
>   STR03 = STRING[3];<br>
> Const<br>
>   MaxIndex = 16;<br>
>   Dance : array[1..3,1..MaxIndex] of STR03 =<br>
>     ((' o ', ' o ', ' o ', ' o ', ' o ', ' o ', '<o ', '<o>', ' o>',<br>
> ' o ', ' o ', ' o ', ' o ', ' o ', ' o ', ' o '),<br>
>      ('^|\', '^|^', 'v|^', 'v|v', '|/v', '|X|', ' \|', ' | ', ' \ ',<br>
> ' x ', '</ ', '<|>', '</>', '<\>', '<)>', ' |\'),<br>
>      (' /\', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ',<br>
> ' >\', '/< ', ' >\', '/< ', ' >\', ' >>', ' L '));<br>
> Var<br>
>   Index : integer;<br>
>   Edit1_Increment : integer;<br>
><br>
> implementation<br>
><br>
> { TForm1 }<br>
><br>
> procedure TForm1.FormCreate(Sender: TObject);<br>
> begin<br>
>   Timer1.enabled := false;<br>
>   Form1.Caption := 'Mr Ascii dancing Macarena...';<br>
>   Edit1_Increment := 10;<br>
>   // start at 200msec delay<br>
>   Timer1.Interval := 200;<br>
>   try<br>
>     Edit1.Text := InttoStr(Timer1.Interval);<br>
>   except<br>
>     showmessage( 'Sorry... not a valid integer');<br>
>   end;<br>
>   Index := 1;<br>
>   Timer1.enabled := true;<br>
> end;<br>
> {----------------------------------------------------------------}<br>
><br>
> procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word; Shift:<br>
> TShiftState);<br>
> begin<br>
>   Timer1.Interval := StrtoIntDef(Edit1.Text,1) +<br>
>   Edit1_Increment<br>
> end;<br>
> {----------------------------------------------------------------}<br>
><br>
> procedure TForm1.Timer1Timer(Sender: TObject);<br>
> begin<br>
>   Timer1.enabled := false;<br>
>   Label1.Caption := Dance[ 1,index ] + #13 +<br>
>                     Dance[ 2,index ] + #13 +<br>
>                     Dance[ 3,index ];<br>
>   index := (index mod MaxIndex) + 1;<br>
>   Timer1.enabled := true;<br>
> end;<br>
> {----------------------------------------------------------------}<br>
><br>
> initialization<br>
>   {$I unit1.lrs}<br>
><br>
> end.<br>
> ----- end of file "unit1"<br>
><br>
</div></div>_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a><br>
<a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Fond Regards,<br>Peter Eric (aka 'pew') WILLIAMS<br><br>My free website is:<br><a href="http://pewtas.googlepages.com">http://pewtas.googlepages.com</a> (or) <a href="http://tinyurl.com/yuyejs">http://tinyurl.com/yuyejs</a><br>
<br>(please visit my free website and let me know what you think about it.)
</div>