[Lazarus] Class TThread in linux;

Sven Barth pascaldragon at googlemail.com
Fri Nov 25 14:30:01 CET 2011

Am 25.11.2011 11:17, schrieb William Oliveira Ferreira:
> Why should set $define usecthreads? only $ifdef linux doesn´t solve the
> issue?

The default projects of Lazarus contain the following code:

   {$ifdef unix}{$ifdef usecthreads}

The "cthreads" unit is the one that must be included for threading 
support on Unix systems. Using a linux system merely satisfies the 
"ifdef unix" condition, but you need to define "usecthreads" as well or 
remove the check completely (you should leave the check for Unix though 
as the "cthreads" unit is not available for e.g. Windows).


More information about the Lazarus mailing list