Windows: load msvcrt and kernel32 manually
authorSimon Marlow <marlowsd@gmail.com>
Wed, 20 May 2009 12:43:10 +0000 (12:43 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 20 May 2009 12:43:10 +0000 (12:43 +0000)
rts/Linker.c

index 347bfa6..8acf818 100644 (file)
@@ -1054,6 +1054,16 @@ initLinker( void )
         mmap_32bit_base = (void*)RtsFlags.MiscFlags.linkerMemBase;
     }
 #endif
+
+#if defined(mingw32_HOST_OS)
+    /*
+     * These two libraries cause problems when added to the static link,
+     * but are necessary for resolving symbols in GHCi, hence we load
+     * them manually here.
+     */
+    addDLL("msvcrt");
+    addDLL("kernel32");
+#endif
 }
 
 /* -----------------------------------------------------------------------------