Indy 10 problem. lazarus / 1-Linux ---------------------------------------------------------------------- Prime · 2006-11-15 00:40 Hi, Working with the following Lazarus V0.9.20, fpc 2.0.4, indy 10.2.0.1, running on SuSE linux 10.0. I have managed to get Indy installed after much fighting with it, and am now trying to get one of my applications to work under Linux. I have copied the files over and got them to compile, but my app barfs as soon as I try and use any of the indy components, complaining that threads are not compiled in. After a little research I find I have to add the following to my program's uses clause :- Code: [Select]   {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF} However the program still barfs out, a little expermentation, I added this to the onclick of a button :- Code: [Select]   {$IFDEF UseCThreads}   ShowMessage('Threads enabled');   {$ELSE}   ShowMessage('Not compiled');   {$ENDIF}                       This always displays 'Not compiled', so threads are still not being enabled, the question is how do I enable them ? Or should the above be enough ? I have just tried inserting {$define UseCThreads} at the top of my program and this seems to work, in that case why use ifdefs for both unix and cthreads, is cthreads only required under linux, if so why not use ifdef linux ? Cheers. Phill. ---------------------------------------------------------------------- Zorba · 2006-11-15 05:00 cthreads is defined under linux. This works (lpr file): Code: [Select] uses   {$IFDEF UNIX}   cthreads,   {$ENDIF}