Using the Apache 2.2.0 rev2 Windows source ZIP file, building Apache with mod_deflate bombs out with the following error: NMAKE -f mod_deflate.mak CFG="mod_deflate - Win32 Release" RECURSE=0 .\Release\mod_deflate.so Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. tempfile.bat rc.exe /l 0x409 /fo".\Release\mod_deflate.res" /d "NDEBUG" .\mod_deflate.rc cl.exe @C:\Temp\nma04736. mod_deflate.c link.exe @C:\Temp\nmb04736. LINK : fatal error LNK1181: cannot open input file "zlib.lib" NMAKE : fatal error U1077: 'link.exe' : return code '0x49d' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\NMAKE.exe"' : return code '0x2' Stop. Error executing NMAKE. httpd.exe - 3 error(s), 15 warning(s)
No, this isn't a failure. Build zlib in place first. We now use the win32/makefile.msc results, so you build that, we link in zlib.lib to bind to zlib1.dll.
That would be convenient if zlib built that way, but it doesn't. LIB : fatal error LNK1181: cannot open input file "zlib_L.lib" NMAKE : fatal error U1077: 'lib' : return code '0x49d' Stop. This is marked as a bug that appears as a FAQ. Which FAQ contains this subject so I can research further?
I'm guessing you are trying a debug build? It's important to be sure you link against a debug build of libz, and visa versa if you are building a release. I'm not on a win32 box at the moment, but will review this when I have one at hand. FAQ indicates this -will- become a frequently asked question, and that this is the bug thread that tracks the answers. Thank you for submitting a clearly defined and documented issue :)
OK. The problem was that when you build zlib 1.2.3 as instructed, the zlib.lib is not located where Apache wants it to be. You have to move the zlib.lib file into the zlib root. Then it works fine. New MSVC++ build instructions should read: 1. Download zlib and open the zlib.dsw project file in MSVC++. 2. Switch the "Active Configuration" to "WIN32 LIB Release". 3. Build zlib.lib. 4. Locate the newly-built zlib.lib and place it in the root directory of the zlib distribution (i.e., same directory as zlib.h). 5. Copy the zlib directory to the Apache srclib directory. 6. Build Apache.
Unfortunately, this is at odds with the methods in their makefile.msc file which deposits the .lib (and .dll file) in the root. Following -their- README to build the project results in the library residing in the right place. Obviously this is an issue, one which I'll bring to the attention of zlib's developers.