From 894bcbdeb7ee8f7911a15277a13897c01c4269e3 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 8 Apr 2021 17:35:19 +0300 Subject: [PATCH] [OCC][Windows] MEDCoupling can't be built under Windows after 34b392fa96 commit --- src/ICoCo/ICoCo.hxx | 37 +++++++++++++++++++++++++++++++ src/ICoCo/ICoCoField.hxx | 4 +++- src/ICoCo/ICoCoMEDDoubleField.hxx | 3 ++- src/ICoCo/ICoCoMEDIntField.hxx | 2 +- src/PyWrapping/medcoupling.i | 1 + 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 src/ICoCo/ICoCo.hxx diff --git a/src/ICoCo/ICoCo.hxx b/src/ICoCo/ICoCo.hxx new file mode 100644 index 000000000..e523f70b0 --- /dev/null +++ b/src/ICoCo/ICoCo.hxx @@ -0,0 +1,37 @@ +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// WARNING: this file is part of the official ICoCo API and should not be modified. +// The official version can be found at the following URL: +// +// https://github.com/cea-trust-platform/icoco-coupling + +#ifndef ICoCo_included + +#ifdef WIN32 +# if defined medicoco_EXPORTS +# define MEDCOUPLINGICOCO_EXPORT __declspec( dllexport ) +# else +# define MEDCOUPLINGICOCO_EXPORT __declspec( dllimport ) +# endif +#else +# define MEDCOUPLINGICOCO_EXPORT +#endif + +#endif // ICoCo_included diff --git a/src/ICoCo/ICoCoField.hxx b/src/ICoCo/ICoCoField.hxx index 579ee0f28..ea4959e2e 100644 --- a/src/ICoCo/ICoCoField.hxx +++ b/src/ICoCo/ICoCoField.hxx @@ -26,13 +26,15 @@ #define ICoCoField_included #include +#include "ICoCo.hxx" + namespace ICoCo { /*! @brief Top abstract class defining field objects that can be exchanged via the ICoCo interface. * * The Field class holds the name of the field. */ - class Field + class MEDCOUPLINGICOCO_EXPORT Field { public: /*! @brief Set the name of the field. diff --git a/src/ICoCo/ICoCoMEDDoubleField.hxx b/src/ICoCo/ICoCoMEDDoubleField.hxx index 57596ebf0..ef68ea9a0 100644 --- a/src/ICoCo/ICoCoMEDDoubleField.hxx +++ b/src/ICoCo/ICoCoMEDDoubleField.hxx @@ -26,6 +26,7 @@ #define ICoCoMEDDoubleField_included #include "ICoCoField.hxx" +#include "ICoCo.hxx" namespace MEDCoupling { @@ -44,7 +45,7 @@ namespace ICoCo * @sa the MEDCoupling documentation, notably the reference counter mechanism used to manage the lifecycle of * MEDCoupling objects. */ - class MEDDoubleField : public ICoCo::Field + class MEDCOUPLINGICOCO_EXPORT MEDDoubleField : public ICoCo::Field { public: /*! Builds an empty field (internal MEDCoupling object not set). diff --git a/src/ICoCo/ICoCoMEDIntField.hxx b/src/ICoCo/ICoCoMEDIntField.hxx index b348217d2..1adfbc859 100644 --- a/src/ICoCo/ICoCoMEDIntField.hxx +++ b/src/ICoCo/ICoCoMEDIntField.hxx @@ -44,7 +44,7 @@ namespace ICoCo * @sa the MEDCoupling documentation, notably the reference counter mechanism used to manage the lifecycle of * MEDCoupling objects. */ - class MEDIntField : public ICoCo::Field + class MEDCOUPLINGICOCO_EXPORT MEDIntField : public ICoCo::Field { public: /*! Builds an empty field (internal MEDCoupling object not set). diff --git a/src/PyWrapping/medcoupling.i b/src/PyWrapping/medcoupling.i index 3c7a0e6d1..7fe41863a 100644 --- a/src/PyWrapping/medcoupling.i +++ b/src/PyWrapping/medcoupling.i @@ -25,6 +25,7 @@ #define INTERPKERNEL_EXPORT #define MEDCOUPLING_EXPORT #define MEDLOADER_EXPORT +#define MEDCOUPLINGICOCO_EXPORT %include "MEDCouplingCommon.i" -- 2.39.2