--- mingw_numpy/mingw32ccompiler.py	2017-01-20 18:35:33.641000000 +0100
+++ ../../../LocalPrograms/Python36/Lib/site-packages/numpy/distutils/mingw32ccompiler.py	2017-01-20 20:09:32.621000000 +0100
@@ -130,6 +130,7 @@
             else:
                 # gcc-4 series releases do not support -mno-cygwin option
                 self.set_executables(
+                    preprocessor='gcc -E', # required for setup.py config 
                     compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall',
                     compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes',
                     linker_exe='gcc -g',
@@ -246,6 +247,36 @@
 
     # object_filenames ()
 
+    # Simply reimplement the unixcompiler method. The
+    # distutils.unixcompiler.runtime_library_dir_option goes a long way to  
+    # find the appropriate linker path specifications. 
+    # During this process it reads the sysconfig "CC" variable and tries to 
+    # process it. This variable is None for python 3.6 (binary release). Then
+    # it attempts to extract the dirname out of it, which fails as it expects
+    # a string like object. 
+    # This can be fixed by replaceing None with the empty string "", which 
+    # ends up that the runtime library path is specified with '-R' an option
+    # that "gcc.exe (Rev2, Built by MSYS2 project) 6.2.0" chockes on.
+    # As this method there is already quite  long I thought that deriving the 
+    # method would be the most straightforward fix.
+    def runtime_library_dir_option(self, dir):
+        #"Just scratching my itch with msys2 mingw64"
+        return "-L" + dir
+	
+    # What is the  policy for msvcrt / vcruntime? Python distributes it with
+    # the standard release. Is it appropriate to include python's install
+    # directory so that it is automatically found?
+    # The directory where python.exe is  located is in my search path, but
+    # that  did not fix this issue.
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
+        # vcruntime 140 is there...
+        py_path = os.path.dirname(sys.executable)
+        if library_dirs == None:
+            library_dirs = []
+        if runtime_library_dirs == None:
+            runtime_library_dirs = []
+        library_dirs.append(py_path)	
+        return libraries, library_dirs, runtime_library_dirs
 
 def find_python_dll():
     maj, min, micro = [int(i) for i in sys.version_info[:3]]
