diff -rupN --no-dereference Python-3.10.9/setup.py Python-3.10.9-new/setup.py --- Python-3.10.9/setup.py 2022-12-08 09:37:00.871024895 +0100 +++ Python-3.10.9-new/setup.py 2022-12-08 09:37:00.875024895 +0100 @@ -2246,9 +2246,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?