diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f7d1c1225b7e38a184d3a82e855d699e94ae2f6..5508629bc553ee05ea5564d8dbdcd57ed9b138d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -472,7 +472,7 @@ endif(ENABLE_BUILD_ANDROID)
 
 if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS)
   if(NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB)
-    message(SEND_ERROR "Cannot compile GUI without Mesh, Post, Plugin or OneLab")
+    message(SEND_ERROR "Cannot compile GUI without Mesh, Post, Plugin and OneLab")
   endif(NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB)
 
   if(FLTK_JPEG)
@@ -1281,6 +1281,9 @@ if(ENABLE_BUILD_LIB)
 endif(ENABLE_BUILD_LIB)
 if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
   install(TARGETS shared DESTINATION ${GMSH_LIB} OPTIONAL)
+  if(WIN32 OR CYGWIN)
+    
+  endif(WIN32 OR CYGWIN)
 endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
 
 install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN})
diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp
index f5d761d95245ee8169444273de205eff314f1b01..fb8a33bd4ba171085252452f194bd06235c59537 100644
--- a/Common/Gmsh.cpp
+++ b/Common/Gmsh.cpp
@@ -45,6 +45,10 @@
 
 int GmshInitialize(int argc, char **argv)
 {
+  static bool isInitialized = false;
+  if(isInitialized) return 1;
+  isInitialized = true;
+
 #if defined(HAVE_FLTK)
   RedirectIOToConsole();
 #endif
@@ -83,6 +87,11 @@ int GmshSetMessageHandler(GmshMessage *callback)
   return 1;
 }
 
+GmshMessage *GmshGetMessageHandler()
+{
+  return Msg::GetCallback();
+}
+
 int GmshSetBoundingBox(double xmin, double xmax,
                        double ymin, double ymax,
                        double zmin, double zmax)
diff --git a/Common/Gmsh.h b/Common/Gmsh.h
index 28e7f05667e638e2b1707ca038b0595944da1fdb..833cfe7f67ea0604cee2e4175635c4906848a342 100644
--- a/Common/Gmsh.h
+++ b/Common/Gmsh.h
@@ -11,6 +11,7 @@
 
 int GmshInitialize(int argc=0, char **argv=0);
 int GmshSetMessageHandler(GmshMessage *callback);
+GmshMessage *GmshGetMessageHandler();
 int GmshSetBoundingBox(double xmin, double xmax,
                        double ymin, double ymax,
                        double zmin, double zmax);
diff --git a/Common/GmshMessage.h b/Common/GmshMessage.h
index e44f310175753f808eefddde90aeed0ede727f84..d4b3c6f11f7d6d80e4486c6a2b831d8f73e6b81d 100644
--- a/Common/GmshMessage.h
+++ b/Common/GmshMessage.h
@@ -56,6 +56,7 @@ class Msg {
   static void SetCommRank(int val){ _commRank = val; }
   static void SetCommSize(int val){ _commSize = val; }
   static void SetCallback(GmshMessage *callback){ _callback = callback; }
+  static GmshMessage *GetCallback(){ return _callback; }
   static void Barrier();
   static int GetNumThreads();
   static int GetMaxThreads();