diff -rupN Python-2.7.15/Lib/ctypes/__init__.py Python-2.7.15-new/Lib/ctypes/__init__.py
--- Python-2.7.15/Lib/ctypes/__init__.py 2018-04-30 00:47:33.000000000 +0200
+++ Python-2.7.15-new/Lib/ctypes/__init__.py 2018-05-02 17:23:36.310731327 +0200
@@ -446,7 +446,9 @@ class LibraryLoader(object):
cdll = LibraryLoader(CDLL)
pydll = LibraryLoader(PyDLL)
-if _os.name in ("nt", "ce"):
+if _os.name == "nt" and _sys.version.find('GCC') >= 0:
+ pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2], None)
+elif _os.name in ("nt", "ce"):
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
elif _sys.platform == "cygwin":
pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])