LazDaemon use cthreads
- Lazarus/FPC Version: Laz trunk / FPC N/A
- Operating System: Linux
- CPU / Bitness: all
What happens
Simple daemon app stops with error:
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. Runtime error 232 at $000000000040E2FD $000000000040E2FD $000000000041CBA1
What did you expect
The project template should create a out of the box running program.
Steps to reproduce
Create a new daemon app and start it on Linux.
Suggested Solution
- Add -dUseCThreads to package lazdaemon.lpk for derived packages and projects
- OR remove the {$IFDEF UseCThreads} in the created lpr file (RegLazDaemon.pp) as it is used by default
Further References
https://wiki.freepascal.org/Daemons_and_Services#Creating_your_first_Service_Daemon https://www.lazarusforum.de/viewtopic.php?f=16&t=14111&p=126631