PDA

View Full Version : ZLib in FPC



Relfos
09-02-2006, 10:41 PM
Well, finnally, after lots of hacks I managed to compile my game in FPC ( was created originally in Delphi). I used PNGImage unit to load PNGs, but unfortunaly this lib uses some .obj files and FPC seems to not support it.

After exploring fpc, I discovered the ZLib unit, that is 99% compatible with the delphi PNGLib implementation. The problem is, that the game compiled in FPC with ZLib requires a z.dll. This works if I use the zlib.dll and rename it, but its possible to compile it without need for dlls? I'm willing to give FPC a try, but I would like to not have external dlls like in the Delphi version :roll:

dmantione
09-02-2006, 10:51 PM
There is also a PASzlib unit, which is 100% Pascal and therefore doesn't need a DLL.

Relfos
10-02-2006, 12:03 AM
Yes, but it seems to be more complex than zlib. How do I see the interface of the units? Since they are only ppu files, the source isnt there, I dont know how their implementation works, I tried ppudump but it didnt show me nothing about the functions :?

dmantione
10-02-2006, 06:20 AM
Use the source, see http://svn.freepascal.org/svn/fpc/trunk/packages/base/paszlib/paszlib.pas It is very much like the other zlib, you need little or no changes other than use the paszlib unit.