[fpc-pascal] Lazarus complains that it cannot find a dependency, why?
Bo Berglund
bo.berglund at gmail.com
Wed Sep 2 00:21:00 CEST 2020
On Tue, 01 Sep 2020 23:55:08 +0200, Tomas Hajny via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
>Well, I believe that this supposed mystery may be resolved easily. ;-)
>First of all - have you tried to find out what does the displayed error
>number (232) mean? Quick searching reveals that runtime error 232 may
>signalize that you try to use threads without having a thread manager
>included in your application. Under Linux/Unix, you can add a thread
>manager by adding unit cthreads to the uses section of your program.
>That also provides explanation of your "mystery" - the other
>dependencies tried by you included this unit by themselves and thus you
>didn't need to do so in your program.
>
>Hope this helps
>
>Tomas
Yes it does!
Thank you so very much!!!!
I can finally go to bed now....
This is how it looks like in the dpr file:
program SerialTest;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
I usually always take out the extra ifdef for UseCThreads so it looks
like this:
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
But it was forgotten in this test application....
Strange because I have read that cthreads must be first in uses in the
lpr program files in order to make threads work.
How could it work if I add the dependencies, then it would come later
or maybe earlier???
Anyway now working.
THanks again!
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list