[fpc-devel] Unit linking to .obj files and fpcmake.
J. Peter Mugaas
jpmugaas at charter.net
Tue Apr 11 16:57:16 CEST 2006
On Tue, 11 Apr 2006 12:10:40 +0200, Michalis Kamburelis wrote:
> J. Peter Mugaas wrote:
>> On Win32, that may not be desirable since there seems to be
>> several versions of the ZLIB .DLL
> Unfortunately, it's true that there are several (sometimes
> -- various zlib versions, various calling conventions) zlib.dll
> floating around.
And I noticed that the zlib1.dll filename is the same between the official ZLib .DLL and the the one you mentioned. The zlib version you mentioned has a file size of 73.5 KB (75,264 bytes) while the official one has a file size of 58.5 KB (59,904 bytes). What's the key difference between the two? What are the standard calling conventions for them (stdcall or cdecl)?
> Fortunately, there exists more-or-less standard zlib dll library for
> win32. It can be obtained from [http://gnuwin32.sourceforge.net/].
> It is
> frequently updated, so all known security problems should be fixed
> there. It's used by many programs (including gimp for windows, or
> actually gtk 2 for windows; oh, and my programs :) ). It's named
> zlib1.dll (with "1"), so no conflicts with zlib.dll. As far as I am
> aware, no software dared to ever install incompatible zlib1.dll
It might be. I still am biased towards static linking some type of object file (either the .obj form or an .a format) and I noticed that the distribution you mentioned does have libz.a. Does that statically link all the zlib code or do would have to include the .dll? If it does, then I might want to consider that instead. If I go that route, the original question (i'll phrase it a little differently still applies).
In package for Windows, I have some object files that the unit requires. How do I make a Makefile.fpc file that installs the object files into a package and allows programs using the package to locate the object files? In other words, I want to be sure that a developer can use this unit in Windows? In other words, what entries do I have to make for this in the Makefile.fpc?
I hate to sound argumentative but I'm just trying to approach this very carefully. If push comes to shove, I simply change an IFDEF in the header and document which .DLL to use (I admit that I still do not like solution).
I once had an open mind until people used it as a trashcan.
J. Peter Mugaas, E-Mail: oma00215 at mail.wvnet.edu
More information about the fpc-devel