[Lazarus] Thread support in package in MacOS 10.5

Reenen Laurie rlaurie at gmail.com
Fri Sep 5 08:33:31 CEST 2008

>From here<http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial>

Units needed for a multithreaded application

You donĀ“t need any special unit for this to work with Windows. However with
Linux, *Mac OS X* and FreeBSD, you need the cthreads unit and it must be the
first used unit of the project (the program unit, .lpr)!

So, your Lazarus application code should look like:

program MyMultiThreadedProgram;
{$mode objfpc}{$H+}
{$ifdef unix}
  Interfaces, // this includes the LCL widgetset
  { add your units here },

I am assuming that the $ifdef unix doesn't return true for Mac OS X, but I
am sure there is one that checks if it's a Mac...


On Fri, Sep 5, 2008 at 8:17 AM, Roland Turcan <konf at rotursoft.sk> wrote:
> Hello lazarus project!
> I added some components into package which have some threads inside,
> but after building lazarus, lazarus shows the message:
>> This binary has no thread support compiled in.
>> Recompile the application with a thread-driver in the program uses
>> clause before other units using thread.
> But where to put into package thread support?
> Thanks.
> --
> Best regards, TRoland
> http://www.rotursoft.sk
> http://exekutor.rotursoft.sk
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

,_.>/ _
...speed is good
I believe five out of four people have a problem with fractions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20080905/fc363b7f/attachment-0007.html>

More information about the Lazarus mailing list