[Win32utils-devel] Building zlib with Visual Studio

Daniel Berger djberg96 at gmail.com
Mon May 7 02:55:15 UTC 2012


I noticed that the current C zlib source includes VS solutions under
the "contrib" directory. I built the VC10 project solution, and it
seemed to build all the necessary files, though it named them
zlibwapi.dll and zlibwapi.lib. Anyway, inspecting the generated .dll
files indicates that the deflateReset function was exported:

dumpbin /exports zlibwapi.dll
10   10 0003918B deflateReset = @ILT+390(_deflateReset at 4)

dumpbin /exports zlibwapi.lib
10    _deflateReset at 4

But it doesn't seem to actually export it. BTW, I stuck the headers
under c:/usr/local/zlib/include and the libs under

# ruby extconf.rb --with-zlib-dir=c:/usr/local/zlib
require 'mkmf'
dir_config 'zlib'

have_header 'zlib.h' # yes
have_library 'zlibwapi' # yes
have_library 'zlibwapi', 'deflateReset' # no ???

I did try rebuilding the .lib file from the .def file and at first
that seemed to fix things, but Ruby segfaulted the moment I tried to
run a "gem install" command.

Any ideas?



More information about the win32utils-devel mailing list