Hello Reenen,
Thanks for your fast response. Of course I know, that I need to add "cthreads" into program which I want to build with thread support, but maybe you didn't realize, that I wrote about package of components to be built into Lazarus.
You know, that MyPackage.pas file is generated automatically from LPK file and it contains this:
RL> { This file was automatically created by Lazarus. Do not edit! RL> This source is only used to compile and install the package. RL> }
TRoland;
<<< 5.9.2008 8:33 - Reenen Laurie "" >>>
From here:
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+}
uses
{$ifdef unix}
cthreads,
{$endif}
Interfaces, // this includes the LCL widgetset
Forms
{ 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...
Regards,
-Reenen
Roland Turcan wrote 23 lines
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
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus