[cairo] zlib1.dll

Paul Harris harris.pc at gmail.com
Sun Jan 20 23:52:54 PST 2008


On 21/01/2008, Tor Lillqvist <tml at iki.fi> wrote:
> > Is it possible to tweak the ./configure script so that it tries to
> > link against -lzlib1 instead of -z ?
>
> (presumably you mean "instead of -lz")
>
> Isn't it easier to just generate an *import* library for zlib1.dll
> called libz.a or libz.dll.a, instead of linking directly to the DLL? I
> think linking directly to DLLs is somewhat uncommon, although
> supported by the GNU linker. The USAGE.txt included with the official
> zlib package recommends generating an import library called libzdll.a,
> which I think is a suboptimal name for it, as the "standard" name for
> the library in the Unix world is -lz. Thus I suggest libz.dll.a which
> matches the convention that import libraries end with .dll.a. (The GNU
> linker looks for libfoo.dll.a in addition to libfoo.a when it
> encounters -lfoo.)
>
> --tml
>

Ah yes of course.  This did the job:
mingw32-dlltool --input-def zlib.def --dllname zlib1.dll --output-lib libz.dll.a

thanks Tor!


More information about the cairo mailing list