diff -rupN --no-dereference Python-3.10.0b3/setup.py Python-3.10.0b3-new/setup.py --- Python-3.10.0b3/setup.py 2021-06-22 09:08:15.690251853 +0200 +++ Python-3.10.0b3-new/setup.py 2021-06-22 09:08:15.693251863 +0200 @@ -2217,9 +2217,12 @@ class PyBuildExt(build_ext): # Add the Tcl/Tk libraries libs.append('tk'+ version) libs.append('tcl'+ version) + if HOST_PLATFORM in ['mingw', 'win32']: + for winlib in ['ws2_32','gdi32','comctl32','comdlg32','imm32','uuid','oleaut32','ole32']: + libs.append( winlib ) # Finally, link with the X11 libraries (not appropriate on cygwin) - if not CYGWIN: + if not HOST_PLATFORM in ['cygwin', 'mingw', 'win32']: libs.append('X11') # XXX handle these, but how to detect?