diff -rupN gmsh-2.10.1-source/Common/CommandLine.cpp gmsh-2.10.1-source-new/Common/CommandLine.cpp
--- gmsh-2.10.1-source/Common/CommandLine.cpp 2015-07-27 20:48:28.000000000 +0200
+++ gmsh-2.10.1-source-new/Common/CommandLine.cpp 2015-08-13 00:25:42.493755327 +0200
@@ -20,15 +20,6 @@
#include "CreateFile.h"
#include "OS.h"
-#if defined(HAVE_FLTK)
-#include <FL/Fl.H>
-#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION >= 3)
-// OK
-#else
-#error "Gmsh requires FLTK >= 1.3"
-#endif
-#endif
-
#if defined(HAVE_PETSC)
#include "petsc.h"
#endif
@@ -53,6 +44,15 @@
#include "Parser.h"
#endif
+#if defined(HAVE_FLTK)
+#include <FL/Fl.H>
+#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION >= 3)
+// OK
+#else
+#error "Gmsh requires FLTK >= 1.3"
+#endif
+#endif
+
int GetGmshMajorVersion(){ return GMSH_MAJOR_VERSION; }
int GetGmshMinorVersion(){ return GMSH_MINOR_VERSION; }
int GetGmshPatchVersion(){ return GMSH_PATCH_VERSION; }
diff -rupN gmsh-2.10.1-source/Fltk/helpWindow.cpp gmsh-2.10.1-source-new/Fltk/helpWindow.cpp
--- gmsh-2.10.1-source/Fltk/helpWindow.cpp 2015-06-26 10:58:47.000000000 +0200
+++ gmsh-2.10.1-source-new/Fltk/helpWindow.cpp 2015-08-13 11:22:34.968800495 +0200
@@ -3,13 +3,18 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
+#include "GmshConfig.h"
+
+#if defined(HAVE_MED)
+#include "med.h"
+#endif
+
#include <sstream>
#include <algorithm>
#include <FL/Fl_Help_View.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Color_Chooser.H>
-#include "GmshConfig.h"
#include "FlGui.h"
#include "inputValue.h"
#include "helpWindow.h"
@@ -30,10 +35,6 @@
#include "Standard_Version.hxx"
#endif
-#if defined(HAVE_MED)
-#include "med.h"
-#endif
-
static const char *help_link(Fl_Widget *w, const char *uri)
{
fl_open_uri(uri);
diff -rupN gmsh-2.10.1-source/Geo/GModelIO_MED.cpp gmsh-2.10.1-source-new/Geo/GModelIO_MED.cpp
--- gmsh-2.10.1-source/Geo/GModelIO_MED.cpp 2015-03-31 21:00:28.000000000 +0200
+++ gmsh-2.10.1-source-new/Geo/GModelIO_MED.cpp 2015-08-13 09:52:23.055296911 +0200
@@ -25,9 +25,7 @@
#include "MPyramid.h"
#include "discreteVertex.h"
-extern "C" {
#include <med.h>
-}
#if (MED_MAJOR_NUM == 3)
// To avoid too many ifdefs below we use defines for the bits of the
diff -rupN gmsh-2.10.1-source/Post/PViewDataGModelIO.cpp gmsh-2.10.1-source-new/Post/PViewDataGModelIO.cpp
--- gmsh-2.10.1-source/Post/PViewDataGModelIO.cpp 2015-05-15 15:39:11.000000000 +0200
+++ gmsh-2.10.1-source-new/Post/PViewDataGModelIO.cpp 2015-08-13 10:44:06.519008693 +0200
@@ -361,9 +361,7 @@ void PViewDataGModel::importLists(int N[
#if defined(HAVE_MED)
-extern "C" {
#include <med.h>
-}
#if (MED_MAJOR_NUM == 3)
// To avoid too many ifdefs below we use defines for the bits of the