[Zlib-devel] error when compiling zlib 1.2.3 with MSYS/MinGW

Vincent Torri vtorri at univ-evry.fr
Fri May 4 16:14:35 EDT 2007


Hello,

I tried to compile zlib 1.2.3 with MSYS/MinGW, using win32/Makefile.gcc, 
but dllwrap complained during the creation of the shared library of zlib:

CreateProcess: No error

The MinGW wiki [1] says that dllwrap is deprecated and that gcc should be 
used instead to create the shared library.

Hence, I replaced the dllwrap command in Makefile.gcc by a gcc one:

-       dllwrap --driver-name $(CC) --def win32/zlib.def \
-         --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
+       gcc -shared -o $@ $(OBJS) $(OBJA) zlibrc.o \
+         -Wl,--out-implib,$(IMPLIB) win32/zlib.def

and the compilation of zlib was flawless.

Another thing that can be maybe also usefull is adding the support of 
MinGW in the configure script (and maybe other places too). What do you 
think ?

Is there a way to test the shared lib of zlib created by gcc (with the 
command above) ?

Finally, the MinGW port of zlib [2] has a patch that can fix other things 
in Makefile.gcc (like the import lib name, for example). Maybe it is worth 
loking at it

best reagards

Vincent Torri

[1] http://www.mingw.org/MinGWiki/index.php/dllwrap
[2] 
http://downloads.sourceforge.net/mingw/zlib-1.2.3-mingwPORT-1.tar.bz2?use_mirror=dfn




More information about the Zlib-devel mailing list