[fpc-devel] Classes and cthreads

Pedro Lopez-Cabanillas plcl at telefonica.net
Sat Feb 26 12:55:02 CET 2005


On Saturday 26 February 2005 12:38, Florian Klaempfl wrote:
> > On Saturday 26 February 2005 12:02, I wrote:
> >>On current CVS (FPC-1.9.9) there is a dependency between classes unit and
> >>cthreads. Any program using the classes unit requires to use also
> >> cthreads or it fails with a runtime error. This happens to the utilities
> >> fpcmake and fpdoc.
> >
> > This is not exact. Even if I use also the unit cthreads, the programs
> > fail with the same runtime error. This is on Linux.
>
> cthreads must be one of the first units in the uses clause.

Aha! Yes.

This program works:
	program ok;
	uses cthreads, Classes;
	begin
	  WriteLn('Hello');
	end.

And this one fails:
	program f1;
	uses Classes, cthreads;
	begin
	  WriteLn('Hello');
	end.

And this one also fails:
	program f2;
	uses Classes;
	begin
	  WriteLn('Hello');
	end.


Regards,
Pedro





More information about the fpc-devel mailing list