Also wollte die internet sockets aus dem wiki installieren, kam die fehler meldeung, dass er lresources nicht finden kann. Ersteinmal den pfad zu der lresource unit in lcl im compiler menu angegeben, hat nichts gebracht, dann den pfad in der fpc.cfg angegeben, dmit hatte ich diesen error gelöst. Jetzt allerdings zeigt er mir eine geinze reihe fehler im qeuelltext
/usr/lib/lazarus/components/sockets/socketclient.pas(226,14) Warning: Symbol "Shutdown" is deprecated
procedure TSocketClient.closeMySocket;
begin
if isActive
then begin
shutdown(mySocket,2); !!!das ist die zeile!!!
isActive:=false;
mySocket:=0;
if Assigned(FOnStateChangeEvent)
then
FOnStateChangeEvent(self,isActive);
if NOT rdThread.Terminated
then
rdThread.Terminate;
rdThread.destroy;
end;
/usr/lib/lazarus/components/sockets/socketclient.pas(262,33) Error: Illegal qualifier
/usr/lib/lazarus/components/sockets/socketclient.pas(262,55) Error: Illegal qualifier
/usr/lib/lazarus/components/sockets/socketclient.pas(262,77) Error: Illegal qualifier
/usr/lib/lazarus/components/sockets/socketclient.pas(262,99) Error: Illegal qualifier
procedure TSocketClient.setMySocket;
var
addr: TInetSockAddr;
hAddr : DWord;
tmp : String;
tmp1 : THostAddr;
begin
flush(stdout);
closeMySocket;
rdChars:=0;
if (clHost<>'') and (clPort>0)
then begin
if StrToIntDef(ExtractWord(1,clHost,['.']),0)>0
then
hAddr:=inetAddr(clHost)
else begin
With THostResolver.Create(Nil) do
try
If Not NameLookup(clHost) then
raise ESocketError.Create(seHostNotFound, [clHost]);
tmp1:=HostAddress;
tmp:=intToStr(tmp1[1])+'.'+intToStr(tmp1[2])+'.'+intToStr(tmp1[3])+'.'+intToStr(tmp1[4]); !!!DIE ERROR Zeile!!!alle illegal qualifier errors in dieser zeile
hAddr:=InetAddr(tmp);
finally
free;
end;
end;
/usr/lib/lazarus/components/sockets/socketclient.pas(272,23) Warning: Symbol "Socket" is deprecated
procedure TSocketClient.setMySocket;
var
addr: TInetSockAddr;
hAddr : DWord;
tmp : String;
tmp1 : THostAddr;
begin
flush(stdout);
closeMySocket;
rdChars:=0;
if (clHost<>'') and (clPort>0)
then begin
if StrToIntDef(ExtractWord(1,clHost,['.']),0)>0
then
hAddr:=inetAddr(clHost)
else begin
With THostResolver.Create(Nil) do
try
If Not NameLookup(clHost) then
raise ESocketError.Create(seHostNotFound, [clHost]);
tmp1:=HostAddress;
tmp:=intToStr(tmp1[1])+'.'+intToStr(tmp1[2])+'.'+intToStr(tmp1[3])+'.'+intToStr(tmp1[4]);
hAddr:=InetAddr(tmp);
finally
free;
end;
end;
addr.family:=AF_INET;
addr.addr:=hAddr;
addr.port:=htons(clPort);
mySocket:=Socket(AF_INET,SOCK_STREAM,0); !!!error zeile!!!
if mySocket > 0
then begin
if connect(mySocket,addr,sizeof(addr))
then begin
isActive:=true;
if Assigned(FOnStateChangeEvent)
then
FOnStateChangeEvent(self,isActive);
rdThread:=TSocketReadThread.Create(self);
end elseintTo
Raise ESocketError.Create(seConnectFailed,[clHost+':'+intToStr(clPort)]);
end else
Raise ESocketError.Create(seCreationFailed,[SocketError]);
end;
sem:=false;
end;
/usr/lib/lazarus/components/sockets/socketclient.pas(275,21) Warning: Symbol "Connect" is deprecated
/usr/lib/lazarus/components/sockets/socketclient.pas(362,19) Warning: Symbol "Send" is deprecated
/usr/lib/lazarus/components/sockets/socketclient.pas(502,23) Warning: Symbol "Recv" is deprecated
/usr/lib/lazarus/components/sockets/socketclient.pas(502,38) Hint: Local variable "c" does not seem to be initialized
/usr/lib/lazarus/components/sockets/socketclient.pas(531) Fatal: There were 4 errors compiling module, stopping
hmmm nehme mal an es liegt an der zeile mit den ganzen tmps
, der rest sin ja nur warnings
system: sidux mit xfce lazarus aus den repos (debian sid)