From d2d1f686b18bd98fd49007dcc90b402e8d685a4b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 7 Jun 2024 18:32:26 +0200 Subject: [PATCH] Build libzim on windows with werror=false MSVC throw a lot of warning because we also must re-export stl symbols used in our exported class. See [1] and [2] (and links inside) for more information. Especially [3] which seems to say that we should have issue at link time if it compatibility issue occurs (and so easily catchable). So I just remove the `werror=true` for now. [1] https://stackoverflow.com/questions/16419318/one-way-of-eliminating-c4251-warning-when-using-stl-classes-in-the-dll-interface [2] https://stackoverflow.com/questions/2132747/warning-c4251-when-building-a-dll-that-exports-a-class-containing-an-atlcstrin --- kiwixbuild/dependencies/libzim.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kiwixbuild/dependencies/libzim.py b/kiwixbuild/dependencies/libzim.py index 318afa7..4928c94 100644 --- a/kiwixbuild/dependencies/libzim.py +++ b/kiwixbuild/dependencies/libzim.py @@ -34,6 +34,7 @@ class Libzim(Dependency): configInfo = self.buildEnv.configInfo if neutralEnv("distname") == "Windows": yield "-Dwith_xapian=false" + yield "-Dwerror=false" if configInfo.build == "android": yield "-DUSE_BUFFER_HEADER=false" yield "-Dstatic-linkage=true"