[Xapian-devel] msvc trunk breakage
Mark Hammond
mhammond at skippinet.com.au
Tue Apr 24 01:14:43 BST 2007
> I've also fixed the
> paths in config.mak to match the paths created by the
> recommended binary
> installer for Zlib.
Sadly that doesn't correspond to the layout when built from source - the
patch at the end of this message addresses this, so the individual zlib
directories can be overridden at build time.
However, this raises another issue: I believe that the binary release of
zlib *only* contains a DLL. It might make more sense to include zlib
statically, so there are no runtime dependencies on zlib1.dll. It also
means we don't need to bother shipping zlib1.dll, and there is no
possibility of an incorrect version of the DLL being found at runtime. As a
data-point, for a number of years the Python zipfile module shipped with a
.dll on Windows, but recently moved back to a static build for the reasons
outlined above (which has the side effect of "if you can build Python from
source on Windows, you already have a static zlib built somewhere"). Its
"no skin off my nose", but I thought it worth bringing up for your
consideration.
Cheers,
Mark.
Index: config.mak
===================================================================
--- config.mak (revision 8379)
+++ config.mak (working copy)
@@ -95,6 +95,10 @@
# ------------ Misc external libraries we depend on -------------
ZLIB_DIR=C:\Program Files\GnuWin32
+# If you installed a binary version, the following 2 lines are probably
+# correct. If you build from sources, adjust accordingly.
+ZLIB_INCLUDE_DIR=$(ZLIB_DIR)\include
+ZLIB_LIB_DIR=$(ZLIB_DIR)\lib
#--------------------------------------
# Visual C++ Compiler and linker programs, and flags for these
@@ -105,7 +109,7 @@
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \
wsock32.lib Ws2_32.lib odbccp32.lib /subsystem:console /debug /nologo \
- "$(ZLIB_DIR)\lib\zlib.lib"
+ "$(ZLIB_LIB_DIR)\zlib.lib"
CPP=cl.exe
RSC=rc.exe
@@ -129,7 +133,7 @@
/D "WIN32" /D "__WIN32__" /D "_WINDOWS" \
/D "HAVE_VSNPRINTF" /D "HAVE_STRDUP" /D "_USE_32BIT_TIME_T" \
/D_CRT_SECURE_NO_DEPRECATE \
-/I "$(ZLIB_DIR)\include"
+/I "$(ZLIB_INCLUDE_DIR)"
# The various parts of Xapian
XAPIAN_LIBS = \
More information about the Xapian-devel
mailing list