--- a/Dialogs.cpp
+++ b/Dialogs.cpp
@@ -2318,7 +2318,7 @@
   strcpy(zip_path, ZipPath.ToUTF8());
   filename = (char *) malloc(Filename.Len() * 4);
   strcpy(filename, Filename.ToUTF8());
-  dbf = gaiaOpenZipDbf(ZipPath, filename, charset, "UTF-8");
+  dbf = gaiaOpenZipDbf(ZipPath.ToUTF8(), filename, charset, "UTF-8");
   free(zip_path);
   free(filename);
   if (dbf == NULL)
@@ -3342,7 +3342,7 @@
   basename = (char *) malloc(Basename.Len() * 4);
   strcpy(basename, Basename.ToUTF8());
   dbf_name = sqlite3_mprintf("%s.dbf", basename);
-  dbf = gaiaOpenZipDbf(ZipPath, dbf_name, charset, "UTF-8");
+  dbf = gaiaOpenZipDbf(ZipPath.ToUTF8(), dbf_name, charset, "UTF-8");
   sqlite3_free(dbf_name);
   free(zip_path);
   free(basename);
--- a/DialogsGraph.cpp
+++ b/DialogsGraph.cpp
@@ -34,6 +34,10 @@
 #include <rasterlite2/rasterlite2.h>
 #include <rasterlite2/rl2graphics.h>
 
+#ifdef __MINGW32__
+#include <pthread.h>
+#endif
+
 #if defined(_WIN32) || defined (__MINGW32__)
 #define FORMAT_64	"%I64d"
 #else
