--- a/setup.py
+++ b/setup.py
@@ -139,7 +139,7 @@
     'brunsli': ext(libraries=['brunslidec-c', 'brunslienc-c']),
     'bz2': ext(libraries=['bz2']),
     'cms': ext(libraries=['lcms2']),
-    'deflate': ext(libraries=['deflate']),
+    'deflate': ext(libraries=['deflate'],define_macros=[('LIBDEFLATE_DLL', 1)]),
     # 'exr': ext(
     #     sources=['3rdparty/tinyexr/tinyexr.cc'],
     #     include_dirs=['3rdparty/tinyexr'],
