[Lazarus] Class TThread in linux;

Sven Barth pascaldragon at googlemail.com
Fri Nov 25 16:03:05 CET 2011


Am 25.11.2011 15:21, schrieb William Oliveira Ferreira:
> Thanks for the awnser, Sven, but, my question is why not only use
> {$ifdef unix}
> cthreads
> {$endif}
> and i didnĀ“t understand yet...

Using unit "cthreads" also means linking to the C library. As not every 
applications needs threading (and thus the linking to the C library) 
this was made optional. If you use Lazarus with a GTK2 or Qt based LCL 
then you might as well remove the "ifdef usecthreads" as the two 
mentioned widgetsets include references to the C library, so it doesn't 
matter whether you use "cthreads" or not. On the other hand if you'd use 
fpGUI (or fpGUI-LCL) then you might wish to not include "cthreads" as 
there no linking to the C library is necessary.

I hope it is more clear now.

Regards,
Sven




More information about the Lazarus mailing list