Salome HOME
[OCC][Windows] MEDCoupling can't be built under Windows after 34b392fa96 commit
authorrnv <rnv@opencascade.com>
Thu, 8 Apr 2021 14:35:19 +0000 (17:35 +0300)
committerrnv <rnv@opencascade.com>
Thu, 22 Apr 2021 09:01:30 +0000 (12:01 +0300)
src/ICoCo/ICoCo.hxx [new file with mode: 0644]
src/ICoCo/ICoCoField.hxx
src/ICoCo/ICoCoMEDDoubleField.hxx
src/ICoCo/ICoCoMEDIntField.hxx
src/PyWrapping/medcoupling.i

diff --git a/src/ICoCo/ICoCo.hxx b/src/ICoCo/ICoCo.hxx
new file mode 100644 (file)
index 0000000..e523f70
--- /dev/null
@@ -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
index 579ee0f28a0b00cc92a6cdea7bc08fdd4e9e4626..ea4959e2ef033e126554e638f0329f5b18e8b1ea 100644 (file)
 #define ICoCoField_included
 #include <string>
 
+#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.
index 57596ebf01e64a288a38f4118d02e0f7229beefc..ef68ea9a03988573d61c427d9f7129b533d392c9 100644 (file)
@@ -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).
index b348217d25669a5c813ecde1d658405b151e90c0..1adfbc8598a4d7d8a1e84b58e7f21254ba75a3dc 100644 (file)
@@ -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).
index 3c7a0e6d1d0f11000c1c0bb572d5cb6703c19a32..7fe41863a6627b5934c3c3ad46d867018fb0cfe1 100644 (file)
@@ -25,6 +25,7 @@
 #define INTERPKERNEL_EXPORT
 #define MEDCOUPLING_EXPORT
 #define MEDLOADER_EXPORT
+#define MEDCOUPLINGICOCO_EXPORT
 
 %include "MEDCouplingCommon.i"