PROTON-2143: Get rid of Windows linkage warnings
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index b4470d5..85703f3 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -57,6 +57,7 @@
 
 # pn_url_parse is not in proton core and is only used by messenger so compile specially
 pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c  ${PN_C_SOURCE_DIR}/core/util.c)
+target_compile_definitions(fuzz-url PRIVATE PROTON_DECLARE_STATIC)
 
 # This regression test can take a very long time so don't run by default
 if(HAS_PROACTOR AND FUZZ_LONG_TESTS)
diff --git a/python/setup.py.in b/python/setup.py.in
index a12ec73..31fa59e 100644
--- a/python/setup.py.in
+++ b/python/setup.py.in
@@ -326,5 +326,5 @@
       # Configure class above
       ext_modules=[Extension('_cproton',
                              sources=['cproton_wrap.c'],
-                             extra_compile_args=['-pthread'],
+                             extra_compile_args=['-pthread', '-DPROTON_DECLARE_STATIC'],
                              libraries=['qpid-proton-core'])])