[fpc-pascal] paszlib problem: integer overflow
dennis at avidsoft.com.hk
Thu Nov 14 18:15:28 CET 2013
I works fine on my Delphi 5 until I try to compress a file with size
>>> of 70M and it raises the exception of integer flow error.
> That means you enabled that somehow. Integer under/overflow is generally not
> enabled by default, and it is somewhat unlogical to use it with converted C
>>> I initially thought it might be a Delphi 5 problem so I tried to use
>>> Lazarus with fpc 2.6.2 to compile the same problem but it kept
>>> complaining cannot find zstream although I already add FCL package to
>>> the required packages list.
> Probably cause by providing external paszlib sources, in combination with
> precompiled already there paszlib sources, the compiler gets confused what
> depends on what.
> Forget about the -sg code for Lazarus, simply use the FPC provided one only.
> Turn off the range checks, and try again.
I'd love to just use the paszlib in Lazarus/fpc but I also need the same
unit for Delphi 5 (Dephi 5 program will compress data and send to linux
/lazarus/fpc program ) so both sides need to understand the same
I tried using the lazarus/fpc paszlib unit in Dephi 5 but it does not
compile. Too many errors.
The paszlib-sg is the only pascal unit that produces compressed data
readable by FPC's zstream and zipper units.
More information about the fpc-pascal