Index: bindings/python/setup.py
--- bindings/python/setup.py.orig
+++ bindings/python/setup.py
@@ -207,7 +207,7 @@ class LibtorrentBuildExt(BuildExtBase):
     def initialize_options(self):
 
         self.config_mode = self.CONFIG_MODE_DISTUTILS
-        self.b2_args = ""
+        self.b2_args = "toolset=clang cxxstd=17 libtorrent-python-pic=on"
         self.no_autoconf = ""
 
         self.cxxflags = None
@@ -365,8 +365,8 @@ class LibtorrentBuildExt(BuildExtBase):
         if os.name == "nt":
             self._maybe_add_arg("--abbreviate-paths")
 
-        self._maybe_add_arg("boost-link=static")
-        self._maybe_add_arg("libtorrent-link=static")
+        self._maybe_add_arg("boost-link=shared")
+        self._maybe_add_arg("libtorrent-link=shared")
 
         self._maybe_add_arg("crypto=openssl")
 
