diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py
--- Python-3.8.0-orig/setup.py	2019-10-22 10:01:35.318204100 +0300
+++ Python-3.8.0/setup.py	2019-10-22 10:01:36.394606000 +0300
@@ -2043,9 +2043,12 @@
         self.add(ext)
         if TEST_EXTENSIONS:
             # function my_sqrt() needs libm for sqrt()
+            ffi_test_libs = ['m']
+            if MS_WINDOWS:
+                ffi_test_libs += ['oleaut32']
             self.add(Extension('_ctypes_test',
                                sources=['_ctypes/_ctypes_test.c'],
-                               libraries=['m']))
+                               libraries=ffi_test_libs))
 
         ffi_inc_dirs = self.inc_dirs.copy()
         if MACOS:
@@ -2073,6 +2076,8 @@
         if ffi_inc and ffi_lib:
             ext.include_dirs.extend(ffi_inc)
             ext.libraries.append(ffi_lib)
+            if MS_WINDOWS:
+                ext.libraries.extend(['ole32', 'oleaut32', 'uuid'])
             self.use_system_libffi = True
 
         if sysconfig.get_config_var('HAVE_LIBDL'):
