Forum > Beginners

TThread class under Linux Ubuntu x64

(1/1)

drvmotor:
Hello.
The program works well under win7 and xp.
When I tried to compile it under Ubuntu, the following runtime exception has been encountered

--- Code: ---Semaphore init failed (possibly too many concurrent threads).

Press OK to ignore and risk data corruption.
Press Cancel to kill the program.

--- End code ---
After this I have tried to compile separated test,indeed, but that error appeared again.
--
What's wrong?

zeljko:
add cthreads unit in your lpr.

drvmotor:
Thanks for fast reply.
cthreads is already included. It was a first matter that I checked.
On the Tthread test I explicitly added contitional define UseCThreads:=1 to avoid any missed  stuff related to subj
--
Oops, wrong!
Now I entirely deleted this conditional checking, UseCThreads, the error disappears.
So, UseCThreads... where it can be defined? Obviously it is a nice feature.

Blaazen:

--- Quote ---UseCThreads:=1
--- End quote ---
What does this mean?

*.lpr should look like this:

--- Code: ---{$IFDEF UNIX}{$DEFINE UseCThreads}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
--- End code ---
(or remove the ifdef-endif).

drvmotor:

--- Quote from: Blaazen on May 18, 2014, 03:05:52 pm ---
--- Quote ---UseCThreads:=1
--- End quote ---
What does this mean?

--- End quote ---
Project/Project Options/Compiler Options
seems I defined this as conditional but simple define was need

Thanks, the thread is closed

Navigation

[0] Message Index

Go to full version