Fail to compile ZlibAr lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- Hydexon · 2010-12-23 14:39 Hello, I Download Zlibar from the Lazarus Component Repository in sourceforge.net. i am try to compile but in compile time produce errors described here: /home/cristopher/Componentes/zlibar/zlibar.pas(516,24) Error: Can't take the address of constant expressions /home/cristopher/Componentes/zlibar/zlibar.pas(517,5) Error: Argument can't be assigned to /home/cristopher/Componentes/zlibar/zlibar.pas(518,5) Error: Argument can't be assigned to /home/cristopher/Componentes/zlibar/zlibar.pas(519,5) Error: Argument can't be assigned to /home/cristopher/Componentes/zlibar/zlibar.pas(520,5) Error: Argument can't be assigned to Some help please. P.S: Sorry for my bad english ---------------------------------------------------------------------- Leledumbo · 2010-12-23 15:09 That code must have been existed before FPC 2.4.0 came out. See the wiki on how to fix that. ---------------------------------------------------------------------- Hydexon · 2010-12-23 16:06 Imposible, i am new of this the FPC. some help, the code what produce this errors is it: Code: [Select]procedure TZLibReadArchive.SetStream(AStream: TStream); begin   fStream := AStream;   if AStream <> nil then begin     fStream.Position := 0;     fStream.Read(Header,SizeOf(TZlibArchiveHeader));     Header.MajorVersion := LEtoN(Header.MajorVersion);     Header.MinorVersion := LEtoN(Header.MinorVersion);     Header.MicroVersion := LetoN(Header.MicroVersion);     Header.TOCLength := LEtoN(Header.TOCLength);     VerifyFile;     ReadTOC;   end   else begin     FreeTOC;   end; end; Conflicting Variables: Header of TZlibArchiveHeader Packed Record. ---------------------------------------------------------------------- Marc · 2010-12-23 16:25 What is the declaration of header ? Problem is that Header is a property, probably reading FHeader. In the old fpc versions the Header property was translated into FHeader, so you would get fStream.Read(FHeader,SizeOf.... That is allowed. So if FHeader is visible to your method, use that. ---------------------------------------------------------------------- Hydexon · 2010-12-23 16:49 I'll try ---------------------------------------------------------------------- Hydexon · 2010-12-23 16:52 Thanks you Marc, your suggest work!, You saved me too many hassles!