From f9e65c91a100adaaee9c0c56352cbed26abd55fc Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 13 Jan 2020 15:45:03 +0300 Subject: [PATCH] Fix compilation on Windows with VS 2017 after implementation 64 bit ids in MEDCOUPLING. --- .../MEDReader/IO/MEDFileFieldRepresentationTree.cxx | 11 +++++++++++ src/Plugins/MEDReader/IO/vtkExtractGroup.cxx | 3 +++ src/Plugins/MEDWriter/IO/VTKMEDTraits.hxx | 12 ++++++++++++ 3 files changed, 26 insertions(+) diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx index 891814ef..5a044ad9 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx @@ -48,6 +48,9 @@ #include "vtkDoubleArray.h" #include "vtkIntArray.h" #include "vtkLongArray.h" +#ifdef WIN32 +#include "vtkLongLongArray.h" +#endif #include "vtkFloatArray.h" #include "vtkCellArray.h" #include "vtkPointData.h" @@ -222,10 +225,18 @@ public: }; template<> +#ifdef WIN32 +class MEDFileVTKTraits +#else class MEDFileVTKTraits +#endif { public: +#ifdef WIN32 + typedef vtkLongLongArray VtkType; +#else typedef vtkLongArray VtkType; +#endif typedef MEDCoupling::DataArrayInt64 MCType; }; diff --git a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx index 2b2af12d..7bf32f5d 100644 --- a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx +++ b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx @@ -27,6 +27,9 @@ #include "vtkDataArrayTemplate.h" #include "vtkIntArray.h" #include "vtkLongArray.h" +#ifdef WIN32 +#include "vtkLongLongArray.h" +#endif #include "vtkCellData.h" #include "vtkPointData.h" diff --git a/src/Plugins/MEDWriter/IO/VTKMEDTraits.hxx b/src/Plugins/MEDWriter/IO/VTKMEDTraits.hxx index 08c53489..4efcdc24 100644 --- a/src/Plugins/MEDWriter/IO/VTKMEDTraits.hxx +++ b/src/Plugins/MEDWriter/IO/VTKMEDTraits.hxx @@ -23,6 +23,9 @@ class vtkIntArray; class vtkLongArray; +#ifdef WIN32 +class vtkLongLongArray; +#endif class vtkFloatArray; class vtkDoubleArray; @@ -43,10 +46,19 @@ public: }; template<> +#ifdef WIN32 +class MEDFileVTKTraits +#else class MEDFileVTKTraits +#endif +# { public: +#ifdef WIN32 + typedef vtkLongLongArray VtkType; +#else typedef vtkLongArray VtkType; +#endif typedef MEDCoupling::DataArrayInt64 MCType; }; -- 2.39.2