First, one thing I can say about the fpc is that it is a pretty solid piece of code. Yes, it does have some different quirks with delphi (overloading for example), but in over 1,000,000 lines of code I have personally compiled I have not (recently) found even one instance where it was a bug related to the fpc. Meaning, I always start off by questioning what I did wrong first before blaming the compiler. That is just me, though... Now on to your question...<div>
<br></div><div>It sounds like it fpc parser does not like your class file name for some reason. This is just a guess, however without looking at an strace output. Try several things... First, remove the file and see if it complains. If that does not work, baby step it by creating a new file with a different class name... If you still cannot figure it out, then send the files to <a href="mailto:tgatliff@gatliff.com">tgatliff@gatliff.com</a> and I will see what happened.<br>
<div><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 5:41 PM, Bo Berglund <span dir="ltr"><<a href="mailto:bo.berglund@gmail.com">bo.berglund@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am testing an old Delphi communications component with lazarus. I<br>
don't want to install it as a component but instead create it in code.<br>
So I have started a new project and added the path to the Serial unit<br>
to the project options (Other Unit files).<br>
I also included it in the uses clause.<br>
<br>
In my form I have put code to create it and set its properties like<br>
this:<br>
<br>
procedure TForm1.FormCreate(Sender: TObject);<br>
begin<br>
serComm := TSerial.Create(NIL);<br>
end;<br>
<br>
procedure TForm1.btnOpenClick(Sender: TObject);<br>
begin<br>
serComm.Baudrate := 38400;<br>
serComm.DataBits := d8bit;<br>
serComm.StopBits := st1bit;<br>
serComm.FlowMode := fcNone;<br>
serComm.Port := 1;<br>
serComm.Active := true;<br>
end;<br>
<br>
When I did this lazarus showed me hints on what I could select when I<br>
added the period after the serComm name, so I know that it is known by<br>
lazarus.<br>
But when I try to run the program lazarus shows an error:<br>
<br>
unit1.pas(22,21) Error: Identifier not found "TSerial"<br>
<br>
But TSerial is the class name for the component and it is found by<br>
lazarus when I write the code, so why in heavens name does it not find<br>
it when compiling???????<br>
<br>
<br>
Bo Berglund<br>
<font color="#888888"><br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br></div></div>