From: Robin Cumming <rcumming@an...> - 2009-11-29 17:23:09
I have set up Lazarus Freepascal on Ubuntu 9.10 and
compiled the EchoSrv demo in Synapse39. The program is
aborting and exiting when the Echo Daemon is created as
inherited create(false); ------->>> fails here
As a newbie to Linux and Freepascal there may be
differences to Delphi/Windows that I need to learn about. I
am not sure if this is a Synapse or Laz/FPC problem and
would appreciate assistance in resolving this. Other
programs have been created and successfully run using
Lazarus/FPC on Ubuntu.
I have Lazarus 0.9.26.2-2 and Freepascal 2.2.4-3 installed.
EAST RAND SECURITY EXPO NOW ON
En/na Robin Cumming ha escrit:
> I have set up Lazarus Freepascal on Ubuntu 9.10 and
> compiled the EchoSrv demo in Synapse39. The program is
> aborting and exiting when the Echo Daemon is created as
> follows :
> Constructor TTCPEchoDaemon.Create;
> inherited create(false); ------->>> fails here
That's because under linux you have to explicitly use a thread manager.
Just add cthreads to the use clause of the dpr file.
Then, if you're not running it as root, it will fail since a normal user
cannot bind to ports < 1024, so you'll either have to change the port
(see in echo.pas the call to bind) or run the program as root (inadvisable).